Fix crash in compose screen
This commit is contained in:
parent
1808aaa3e8
commit
b4d41ac9b7
|
@ -105,7 +105,7 @@ class ComposeViewController: UIViewController {
|
||||||
contentWarningBarButtonItem = UIBarButtonItem(title: "CW", style: .plain, target: self, action: #selector(contentWarningButtonPressed))
|
contentWarningBarButtonItem = UIBarButtonItem(title: "CW", style: .plain, target: self, action: #selector(contentWarningButtonPressed))
|
||||||
contentWarningBarButtonItem.accessibilityLabel = NSLocalizedString("Add Content Warning", comment: "add CW accessibility label")
|
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 = 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 = [
|
toolbar.items = [
|
||||||
contentWarningBarButtonItem,
|
contentWarningBarButtonItem,
|
||||||
visibilityBarButtonItem,
|
visibilityBarButtonItem,
|
||||||
|
@ -322,7 +322,7 @@ class ComposeViewController: UIViewController {
|
||||||
|
|
||||||
func visibilityChanged() {
|
func visibilityChanged() {
|
||||||
visibilityBarButtonItem.image = UIImage(systemName: visibility.imageName)
|
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() {
|
func saveDraft() {
|
||||||
|
|
Loading…
Reference in New Issue