From 39e78eac1d53b8ebc5e69f127dec5ee5b623a274 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 14 Jun 2018 13:55:51 +0200 Subject: dont clobber seq/chp --- app/client/live/live.reducer.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'app/client/live/live.reducer.js') diff --git a/app/client/live/live.reducer.js b/app/client/live/live.reducer.js index f1f2f4e..3a5b661 100644 --- a/app/client/live/live.reducer.js +++ b/app/client/live/live.reducer.js @@ -17,7 +17,6 @@ const liveInitialState = { const liveReducer = (state = liveInitialState, action) => { let results; - if (action.type !== 'SYSTEM_STDOUT') console.log(action.type, action) switch(action.type) { case types.socket.load_params: if (! action.opt || ! Object.keys(action.opt).length) { @@ -61,6 +60,25 @@ const liveReducer = (state = liveInitialState, action) => { sequences: action.sequences, } + case types.player.loading_sequence: + return { + ...state, + opt: { + ...state.opt, + sequence_name: action.sequence_name, + } + } + + case types.player.loading_checkpoint: + return { + ...state, + opt: { + ...state.opt, + checkpoint_name: action.checkpoint_name, + epoch: action.epoch, + } + } + case types.player.set_fps: return { ...state, -- cgit v1.2.3-70-g09d2