Invalidate webplayer store on logout

This commit is contained in:
Lucas Verney 2016-08-08 12:22:35 +02:00
parent 4d4ce6c14e
commit 177c67845d
4 changed files with 12 additions and 8 deletions

View File

@ -6,7 +6,8 @@ import {
PLAY_PAUSE,
TOGGLE_RANDOM,
TOGGLE_REPEAT,
TOGGLE_MUTE } from "../actions";
TOGGLE_MUTE,
INVALIDATE_STORE } from "../actions";
import { createReducer } from "../utils";
import { stateRecord } from "../models/webplayer";
@ -48,4 +49,7 @@ export default createReducer(initialState, {
[TOGGLE_MUTE]: (state) => {
return state.set("isMute", !state.get("isMute"));
},
[INVALIDATE_STORE]: () => {
return new stateRecord();
}
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long