* Fix #30439: "Forgot recovery key" should go to "reset" * Wrap showToast in act() to ensure React render is finished * Remove duplicated code
This commit is contained in:
@@ -197,7 +197,8 @@ export const showToast = (kind: Kind): void => {
|
||||
deviceListener.dismissEncryptionSetup();
|
||||
break;
|
||||
}
|
||||
case Kind.KEY_STORAGE_OUT_OF_SYNC: {
|
||||
case Kind.KEY_STORAGE_OUT_OF_SYNC:
|
||||
case Kind.KEY_STORAGE_OUT_OF_SYNC_STORE: {
|
||||
// Open the user settings dialog to the encryption tab and start the flow to reset encryption
|
||||
const payload: OpenToTabPayload = {
|
||||
action: Action.ViewUserSettings,
|
||||
@@ -207,16 +208,6 @@ export const showToast = (kind: Kind): void => {
|
||||
defaultDispatcher.dispatch(payload);
|
||||
break;
|
||||
}
|
||||
case Kind.KEY_STORAGE_OUT_OF_SYNC_STORE: {
|
||||
// Open the user settings dialog to the encryption tab and start the flow to reset 4S
|
||||
const payload: OpenToTabPayload = {
|
||||
action: Action.ViewUserSettings,
|
||||
initialTabId: UserTab.Encryption,
|
||||
props: { initialEncryptionState: "change_recovery_key" },
|
||||
};
|
||||
defaultDispatcher.dispatch(payload);
|
||||
break;
|
||||
}
|
||||
case Kind.TURN_ON_KEY_STORAGE: {
|
||||
// The user clicked "Dismiss": offer them "Are you sure?"
|
||||
const modal = Modal.createDialog(
|
||||
|
||||
Reference in New Issue
Block a user