Skip to content

Commit

Permalink
Fix no updating output (#22273)
Browse files Browse the repository at this point in the history
(cherry picked from commit 6b3d3e7)
  • Loading branch information
jryio committed Jan 29, 2020
1 parent 054fc11 commit fff34a2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions shared/reducers/crypto.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ export default Container.makeReducer<Actions, Types.State>(initialState, {
if (operation !== Constants.Operations.Encrypt) return

const op = draftState.encrypt

// Output no longer valid since recipients have changed
op.outputMatchesInput = false

if (!op.recipients.length && recipients.length) {
op.meta.hasRecipients = true
op.meta.hasSBS = hasSBS
Expand All @@ -89,6 +93,10 @@ export default Container.makeReducer<Actions, Types.State>(initialState, {
...oldOptions,
...newOptions,
}

// Output no longer valid since options have changed
encrypt.outputMatchesInput = false

// User set themselves as a recipient so don't show the 'includeSelf' option for encrypt (since they're encrypting to themselves)
if (hideIncludeSelf) {
encrypt.meta.hideIncludeSelf = hideIncludeSelf
Expand Down

0 comments on commit fff34a2

Please sign in to comment.