diff --git a/Signal/src/ViewControllers/Attachment Keyboard/LimitedPhotoPermissionsView.swift b/Signal/src/ViewControllers/Attachment Keyboard/LimitedPhotoPermissionsView.swift index 288c3f836e..1b5f04a217 100644 --- a/Signal/src/ViewControllers/Attachment Keyboard/LimitedPhotoPermissionsView.swift +++ b/Signal/src/ViewControllers/Attachment Keyboard/LimitedPhotoPermissionsView.swift @@ -26,8 +26,7 @@ class LimitedPhotoPermissionsView: UIView { ), image: UIImage(named: "settings-light") ) { _ in - let openSettingsURL = URL(string: UIApplication.openSettingsURLString)! - UIApplication.shared.open(openSettingsURL) + CurrentAppContext().openSystemSettings() } var buttonConfig = UIButton.Configuration.gray() diff --git a/Signal/src/ViewControllers/HomeView/Chat List/ChatListViewController.swift b/Signal/src/ViewControllers/HomeView/Chat List/ChatListViewController.swift index dca9493409..bfa03b0106 100644 --- a/Signal/src/ViewControllers/HomeView/Chat List/ChatListViewController.swift +++ b/Signal/src/ViewControllers/HomeView/Chat List/ChatListViewController.swift @@ -459,7 +459,7 @@ public class ChatListViewController: OWSViewController, HomeTabViewController { self?.showAppSettings() } ) - barButtonItem.accessibilityLabel = CommonStrings.openSettingsButton + barButtonItem.accessibilityLabel = CommonStrings.openAppSettingsButton barButtonItem.accessibilityIdentifier = "ChatListViewController.settingsButton" return barButtonItem } diff --git a/Signal/src/ViewControllers/HomeView/ConversationSplitViewController.swift b/Signal/src/ViewControllers/HomeView/ConversationSplitViewController.swift index 6162dc2029..a743f9b217 100644 --- a/Signal/src/ViewControllers/HomeView/ConversationSplitViewController.swift +++ b/Signal/src/ViewControllers/HomeView/ConversationSplitViewController.swift @@ -347,10 +347,7 @@ class ConversationSplitViewController: UISplitViewController, ConversationSplit action: #selector(showAppSettings), input: ",", modifierFlags: .command, - discoverabilityTitle: OWSLocalizedString( - "KEY_COMMAND_SETTINGS", - comment: "A keyboard command to present the application settings dialog." - ) + discoverabilityTitle: CommonStrings.openAppSettingsButton ), UIKeyCommand( action: #selector(focusSearch), diff --git a/Signal/src/ViewControllers/HomeView/HomeTabViewController.swift b/Signal/src/ViewControllers/HomeView/HomeTabViewController.swift index cd5e9162d6..b9187f79f3 100644 --- a/Signal/src/ViewControllers/HomeView/HomeTabViewController.swift +++ b/Signal/src/ViewControllers/HomeView/HomeTabViewController.swift @@ -20,13 +20,13 @@ extension HomeTabViewController { showAppSettings: @escaping () -> Void ) -> UIBarButtonItem { let settingsAction = UIAction( - title: CommonStrings.openSettingsButton, + title: CommonStrings.openAppSettingsButton, image: Theme.iconImage(.contextMenuSettings), handler: { _ in showAppSettings() } ) let contextButton = ContextMenuButton(actions: buildActions(settingsAction)) - contextButton.accessibilityLabel = CommonStrings.openSettingsButton + contextButton.accessibilityLabel = CommonStrings.openAppSettingsButton let avatarView = ConversationAvatarView( sizeClass: .twentyEight, @@ -55,7 +55,7 @@ extension HomeTabViewController { } let barButtonItem = UIBarButtonItem(customView: barButtonView) - barButtonItem.accessibilityLabel = CommonStrings.openSettingsButton + barButtonItem.accessibilityLabel = CommonStrings.openAppSettingsButton return barButtonItem } } diff --git a/Signal/src/ViewControllers/LocationPicker.swift b/Signal/src/ViewControllers/LocationPicker.swift index bd14d54d6e..f94c488cd4 100644 --- a/Signal/src/ViewControllers/LocationPicker.swift +++ b/Signal/src/ViewControllers/LocationPicker.swift @@ -168,7 +168,7 @@ public class LocationPicker: UIViewController { comment: "Alert body indicating the user has denied location permissions") ) let openSettingsAction = ActionSheetAction( - title: CommonStrings.openSettingsButton, + title: CommonStrings.openSystemSettingsButton, style: .default ) { _ in UIApplication.shared.openSystemSettings() } alert.addAction(openSettingsAction) diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings index b55fa6a822..7ecd6f7a2b 100644 --- a/Signal/translations/en.lproj/Localizable.strings +++ b/Signal/translations/en.lproj/Localizable.strings @@ -4021,9 +4021,6 @@ /* A keyboard command to begin a search on the conversation list. */ "KEY_COMMAND_SEARCH" = "Search"; -/* A keyboard command to present the application settings dialog. */ -"KEY_COMMAND_SETTINGS" = "Settings"; - /* A keyboard command to open the current conversation's sticker picker. */ "KEY_COMMAND_STICKERS" = "Show Stickers"; @@ -5164,6 +5161,9 @@ /* Title label for the onboarding verification page */ "ONBOARDING_VERIFICATION_TITLE_LABEL" = "Verification code"; +/* Title for button which opens the in-app settings */ +"OPEN_APP_SETTINGS_BUTTON" = "Settings"; + /* Button text which opens the settings app */ "OPEN_SETTINGS_BUTTON" = "Settings"; diff --git a/SignalServiceKit/Util/CommonStrings.swift b/SignalServiceKit/Util/CommonStrings.swift index cda7966c99..868aa3907f 100644 --- a/SignalServiceKit/Util/CommonStrings.swift +++ b/SignalServiceKit/Util/CommonStrings.swift @@ -115,8 +115,18 @@ public enum CommonStrings { OWSLocalizedString("SETTINGS_HELP", comment: "Title for help button and help pages in app settings.") } - static public var openSettingsButton: String { - OWSLocalizedString("OPEN_SETTINGS_BUTTON", comment: "Button text which opens the settings app") + static public var openAppSettingsButton: String { + OWSLocalizedString( + "OPEN_APP_SETTINGS_BUTTON", + comment: "Title for button which opens the in-app settings" + ) + } + + static public var openSystemSettingsButton: String { + OWSLocalizedString( + "OPEN_SETTINGS_BUTTON", + comment: "Button text which opens the settings app" + ) } static public var errorAlertTitle: String { diff --git a/SignalUI/AppLaunch/AppContext+SignalUI.swift b/SignalUI/AppLaunch/AppContext+SignalUI.swift index c2f9632ed6..311b3458a0 100644 --- a/SignalUI/AppLaunch/AppContext+SignalUI.swift +++ b/SignalUI/AppLaunch/AppContext+SignalUI.swift @@ -15,9 +15,7 @@ public class AppContextUtils { return nil } - return ActionSheetAction(title: CommonStrings.openSettingsButton, - accessibilityIdentifier: "system_settings", - style: .default) { _ in + return ActionSheetAction(title: CommonStrings.openSystemSettingsButton) { _ in CurrentAppContext().openSystemSettings() completion?() }