(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:
@@ -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
11
src/store/player/index.ts
Normal 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;
|
||||
Reference in New Issue
Block a user