From b1bbc8be628cf207c0da7e473c315f8a470c5f74 Mon Sep 17 00:00:00 2001 From: Elaine <138257830+elaine-signal@users.noreply.github.com> Date: Wed, 14 Feb 2024 11:44:36 -0700 Subject: [PATCH] Add confirmation sheet after reseting username link and QR code --- .../Links/UsernameLinkPresentQRCodeViewController.swift | 9 +++++++++ Signal/translations/en.lproj/Localizable.strings | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Signal/src/Usernames/Links/UsernameLinkPresentQRCodeViewController.swift b/Signal/src/Usernames/Links/UsernameLinkPresentQRCodeViewController.swift index e83f876c7c..8f3e4517d0 100644 --- a/Signal/src/Usernames/Links/UsernameLinkPresentQRCodeViewController.swift +++ b/Signal/src/Usernames/Links/UsernameLinkPresentQRCodeViewController.swift @@ -639,6 +639,15 @@ class UsernameLinkPresentQRCodeViewController: OWSTableViewController2 { self.usernameChangeDelegate?.usernameStateDidChange( newState: latestUsernameState ) + }.done(on: schedulers.main) { _ in + OWSActionSheets.showActionSheet( + message: OWSLocalizedString( + "USERNAME_LINK_QR_CODE_VIEW_RESET_SUCCESSFUL", + comment: "Text presenting an action sheet notifying the user their QR code and link were reset." + ), + fromViewController: self, + dismissalDelegate: self + ) }.catch(on: schedulers.main) { [weak self] error in guard let self else { return } diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings index 215557c9cb..c4437188b9 100644 --- a/Signal/translations/en.lproj/Localizable.strings +++ b/Signal/translations/en.lproj/Localizable.strings @@ -7697,7 +7697,10 @@ "USERNAME_LINK_QR_CODE_VIEW_RESET_BUTTON_TITLE" = "Reset"; /* A message explaining what will happen if the user resets their QR code. */ -"USERNAME_LINK_QR_CODE_VIEW_RESET_SHEET_MESSAGE" = "If you reset your QR code, your existing QR code and link will no longer work."; +"USERNAME_LINK_QR_CODE_VIEW_RESET_SHEET_MESSAGE" = "If you reset your QR code and link, your existing QR code and link will no longer work."; + +/* Text presenting an action sheet notifying the user their QR code and link were reset. */ +"USERNAME_LINK_QR_CODE_VIEW_RESET_SUCCESSFUL" = "Your QR code and link have been reset and a new QR code and link has been created."; /* Title for a button to share your username link QR code. Lowercase styling is intentional. */ "USERNAME_LINK_QR_CODE_VIEW_SHARE_BUTTON" = "share";