better playlist building

This commit is contained in:
Luke Berndt
2023-01-25 13:06:46 -05:00
parent d8d6d4a149
commit 755364c0b1
3 changed files with 8 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ const initialState = {
filterDate: false,
filterStarred: false,
currentCallId: false,
playlist: [],
live: false
}
@@ -27,6 +28,11 @@ export const callPlayerSlice = createSlice({
state.newestCallTime = action.payload;
state.oldestCallTime = action.payload;
},
setPlaylist: (state, action) => {
if (Array.isArray(action.payload )) {
state.playlist = action.payload;
}
},
setFilter: (state,action) => {
var filter={};
state.live = !action.payload.live ? state.live : action.payload.live;