Publish: Make 'channel' persistent by not clearing it in CLEAR_PUBLISH

Users are annoyed by the constant reset to 'Anonymous'.
This commit is contained in:
infiinte-persistence 2020-08-14 18:32:36 +08:00 committed by Sean Yesmunt
parent 7df96d4767
commit 05b949d470
2 changed files with 2 additions and 0 deletions

1
dist/bundle.es.js vendored
View file

@ -5619,6 +5619,7 @@ const publishReducer = handleActions({
return _extends$c({}, state, data); return _extends$c({}, state, data);
}, },
[CLEAR_PUBLISH]: state => _extends$c({}, defaultState$4, { [CLEAR_PUBLISH]: state => _extends$c({}, defaultState$4, {
channel: state.channel,
bid: state.bid, bid: state.bid,
optimize: state.optimize optimize: state.optimize
}), }),

View file

@ -83,6 +83,7 @@ export const publishReducer = handleActions(
}, },
[ACTIONS.CLEAR_PUBLISH]: (state: PublishState): PublishState => ({ [ACTIONS.CLEAR_PUBLISH]: (state: PublishState): PublishState => ({
...defaultState, ...defaultState,
channel: state.channel,
bid: state.bid, bid: state.bid,
optimize: state.optimize, optimize: state.optimize,
}), }),