Fix crash in compose screen

This commit is contained in:
Shadowfacts 2019-09-28 00:37:43 -04:00
parent 1808aaa3e8
commit b4d41ac9b7
Signed by untrusted user: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 2 additions and 2 deletions

View File

@ -105,7 +105,7 @@ class ComposeViewController: UIViewController {
contentWarningBarButtonItem = UIBarButtonItem(title: "CW", style: .plain, target: self, action: #selector(contentWarningButtonPressed))
contentWarningBarButtonItem.accessibilityLabel = NSLocalizedString("Add Content Warning", comment: "add CW accessibility label")
visibilityBarButtonItem = UIBarButtonItem(image: UIImage(systemName: Preferences.shared.defaultPostVisibility.imageName), style: .plain, target: self, action: #selector(visibilityButtonPressed))
visibilityBarButtonItem.accessibilityLabel = String(format: NSLocalizedString("Visibility: %s", comment: "compose visiblity accessibility label"), Preferences.shared.defaultPostVisibility.displayName)
visibilityBarButtonItem.accessibilityLabel = String(format: NSLocalizedString("Visibility: %@", comment: "compose visiblity accessibility label"), Preferences.shared.defaultPostVisibility.displayName)
toolbar.items = [
contentWarningBarButtonItem,
visibilityBarButtonItem,
@ -322,7 +322,7 @@ class ComposeViewController: UIViewController {
func visibilityChanged() {
visibilityBarButtonItem.image = UIImage(systemName: visibility.imageName)
visibilityBarButtonItem.accessibilityLabel = String(format: NSLocalizedString("Visibility: %s", comment: "compose visiblity accessibility label"), Preferences.shared.defaultPostVisibility.displayName)
visibilityBarButtonItem.accessibilityLabel = String(format: NSLocalizedString("Visibility: %@", comment: "compose visiblity accessibility label"), Preferences.shared.defaultPostVisibility.displayName)
}
func saveDraft() {