Check microphone permissions: Clean up
* copy tweaks * use "settings" instead of "privacy settings" for button text * include comments in NSLocalizedString param so they can be extracted with genstrings * style dismiss action as "cancel" // FREEBIE
This commit is contained in:
parent
70efb5e9ec
commit
da8596c1ba
|
@ -46,7 +46,6 @@ import Foundation
|
|||
return false
|
||||
}
|
||||
|
||||
|
||||
// Check for microphone permissions
|
||||
// Alternative way without prompting for permissions:
|
||||
// if AVAudioSession.sharedInstance().recordPermission() == .denied {
|
||||
|
@ -61,15 +60,15 @@ import Foundation
|
|||
}
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
/// Cleanup and present alert for no permissions
|
||||
private func showNoMicrophonePermissionAlert() {
|
||||
let alertTitle = NSLocalizedString("CALL_AUDIO_PERMISSION_TITLE", comment:"Alert Title")
|
||||
let alertMessage = NSLocalizedString("CALL_AUDIO_PERMISSION_MESSAGE", comment:"Alert message")
|
||||
let alertTitle = NSLocalizedString("CALL_AUDIO_PERMISSION_TITLE", comment:"Alert title when calling and permissions for microphone are missing")
|
||||
let alertMessage = NSLocalizedString("CALL_AUDIO_PERMISSION_MESSAGE", comment:"Alert message when calling and permissions for microphone are missing")
|
||||
let alertController = UIAlertController(title: alertTitle, message: alertMessage, preferredStyle: .alert)
|
||||
let dismiss = NSLocalizedString("DISMISS_BUTTON_TEXT", comment: "Generic short text for button to dismiss a dialog")
|
||||
let dismissAction = UIAlertAction(title: dismiss, style: .default)
|
||||
let settingsString = NSLocalizedString("CALL_VIEW_SETTINGS_NAG_SHOW_CALL_SETTINGS", comment: "Settings button text")
|
||||
let dismissAction = UIAlertAction(title: dismiss, style: .cancel)
|
||||
let settingsString = NSLocalizedString("OPEN_SETTINGS_BUTTON", comment: "Button text which opens the settings app")
|
||||
let settingsAction = UIAlertAction(title: settingsString, style: .default) { _ in
|
||||
UIApplication.shared.openURL(URL(string: UIApplicationOpenSettingsURLString)!)
|
||||
}
|
||||
|
|
|
@ -160,11 +160,11 @@
|
|||
/* Title format for action sheet that offers to block an unknown user.Embeds {{the unknown user's name or phone number}}. */
|
||||
"BLOCK_OFFER_ACTIONSHEET_TITLE_FORMAT" = "Block %@?";
|
||||
|
||||
/* Alert message */
|
||||
"CALL_AUDIO_PERMISSION_MESSAGE" = "Signal requires access to your microphone to make calls. You can grant this permission in the Settings app";
|
||||
/* Alert message when calling and permissions for microphone are missing */
|
||||
"CALL_AUDIO_PERMISSION_MESSAGE" = "Signal requires access to your microphone to make calls. You can grant this permission in the Settings app.";
|
||||
|
||||
/* Alert Title */
|
||||
"CALL_AUDIO_PERMISSION_TITLE" = "Call failed";
|
||||
/* Alert title when calling and permissions for microphone are missing */
|
||||
"CALL_AUDIO_PERMISSION_TITLE" = "Microphone Access Required";
|
||||
|
||||
/* Accessibilty label for placing call button */
|
||||
"CALL_LABEL" = "Call";
|
||||
|
@ -184,8 +184,7 @@
|
|||
/* Label for button that dismiss the call view's settings nag. */
|
||||
"CALL_VIEW_SETTINGS_NAG_NOT_NOW_BUTTON" = "Not Now";
|
||||
|
||||
/* Label for button that shows the privacy settings
|
||||
Settings button text */
|
||||
/* Label for button that shows the privacy settings */
|
||||
"CALL_VIEW_SETTINGS_NAG_SHOW_CALL_SETTINGS" = "Show Privacy Settings";
|
||||
|
||||
/* notification action */
|
||||
|
|
Loading…
Reference in New Issue