diff options
author | Reverite <github@reverite.sh> | 2019-06-01 22:29:46 -0700 |
---|---|---|
committer | Reverite <github@reverite.sh> | 2019-06-01 22:29:46 -0700 |
commit | 846a09a7435fb9eb435e9950175ee0e696ed4909 (patch) | |
tree | 9f63c888a5c380d17e1c75ad339a8ca0d689717e /app/javascript/flavours/glitch/reducers | |
parent | fdca8d63efe06675ca890358547fcbe7a42631f0 (diff) | |
parent | 17fb1c4345348da5a6f9338912824a03d348841f (diff) |
Merge branch 'glitch' into production
Diffstat (limited to 'app/javascript/flavours/glitch/reducers')
-rw-r--r-- | app/javascript/flavours/glitch/reducers/compose.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js index c0c2fc547..51a341c42 100644 --- a/app/javascript/flavours/glitch/reducers/compose.js +++ b/app/javascript/flavours/glitch/reducers/compose.js @@ -57,7 +57,7 @@ const totalElefriends = 3; const glitchProbability = 1 - 0.0420215528; const initialState = ImmutableMap({ - mounted: false, + mounted: 0, advanced_options: ImmutableMap({ do_not_federate: false, threaded_mode: false, @@ -280,9 +280,9 @@ export default function compose(state = initialState, action) { case STORE_HYDRATE: return hydrate(state, action.state.get('compose')); case COMPOSE_MOUNT: - return state.set('mounted', true); + return state.set('mounted', state.get('mounted') + 1); case COMPOSE_UNMOUNT: - return state.set('mounted', false); + return state.set('mounted', Math.max(state.get('mounted') - 1, 0)); case COMPOSE_ADVANCED_OPTIONS_CHANGE: return state .set('advanced_options', state.get('advanced_options').set(action.option, !!overwrite(!state.getIn(['advanced_options', action.option]), action.value))) |