diff --git a/submodules/SettingsUI/Sources/DeleteAccountDataController.swift b/submodules/SettingsUI/Sources/DeleteAccountDataController.swift index 51485e6aa2..ce7a7166b5 100644 --- a/submodules/SettingsUI/Sources/DeleteAccountDataController.swift +++ b/submodules/SettingsUI/Sources/DeleteAccountDataController.swift @@ -310,6 +310,7 @@ func deleteAccountDataController(context: AccountContext, mode: DeleteAccountDat } } + var secondaryActionDisabled = false let signal = combineLatest(queue: .mainQueue(), context.sharedContext.presentationData, peers, @@ -342,7 +343,10 @@ func deleteAccountDataController(context: AccountContext, mode: DeleteAccountDat let footerItem = DeleteAccountFooterItem(theme: presentationData.theme, title: buttonTitle, secondaryTitle: presentationData.strings.DeleteAccount_Continue, action: { cancelImpl() }, secondaryAction: { - proceedImpl?() + if !secondaryActionDisabled { + secondaryActionDisabled = true + proceedImpl?() + } }) let controllerState = ItemListControllerState(presentationData: ItemListPresentationData(presentationData), title: .text(presentationData.strings.DeleteAccount_DeleteMyAccountTitle), leftNavigationButton: leftNavigationButton, rightNavigationButton: rightNavigationButton, backNavigationButton: ItemListBackButton(title: presentationData.strings.Common_Back)) @@ -466,7 +470,7 @@ func deleteAccountDataController(context: AccountContext, mode: DeleteAccountDat let presentGlobalController = context.sharedContext.presentGlobalController let _ = logoutFromAccount(id: accountId, accountManager: accountManager, alreadyLoggedOutRemotely: false).start(completed: { Queue.mainQueue().after(0.1) { - presentGlobalController(UndoOverlayController(presentationData: presentationData, content: .info(title: nil, text: presentationData.strings.DeleteAccount_Success), elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false }), nil) + presentGlobalController(UndoOverlayController(presentationData: presentationData, content: .info(title: nil, text: presentationData.strings.DeleteAccount_Success), elevatedLayout: true, animateInAsReplacement: false, action: { _ in return false }), nil) } }) })