(1) Play whole album when selecting a single track

(2) Create popup window on track long-press in which the track can be added to the end or front of the queue
(3) Add Redux counter for added tracks so that the queue is properly updated
This commit is contained in:
Lei Nelissen
2020-08-28 16:28:49 +02:00
parent 3026fdf4da
commit c88158cf16
11 changed files with 226 additions and 29 deletions

View File

@@ -13,9 +13,11 @@ const persistConfig: PersistConfig<AppState> = {
import settings from './settings';
import music from './music';
import player from './player';
const reducers = combineReducers({
settings,
player: player.reducer,
music: music.reducer,
});

11
src/store/player/index.ts Normal file
View File

@@ -0,0 +1,11 @@
import { createSlice } from '@reduxjs/toolkit';
const player = createSlice({
name: 'player',
initialState: 0,
reducers: {
addNewTrackToPlayer: (state) => state + 1,
}
});
export default player;