View profile VoiceOver action on notifications

This commit is contained in:
Justin Mazzocchi 2021-03-08 20:52:15 -08:00
parent c10934f32b
commit ba59c9bbab
No known key found for this signature in database
GPG key ID: E223E6937AAFB01C
2 changed files with 10 additions and 0 deletions

View file

@ -175,6 +175,7 @@
"main-navigation.notifications" = "Notifications";
"main-navigation.conversations" = "Messages";
"metatext" = "Metatext";
"notification.accessibility.view-profile" = "View profile";
"notification.signed-in-as-%@" = "Logged in as %@";
"notification.new-items" = "New notifications";
"notification.poll" = "A poll you have voted in has ended";

View file

@ -250,6 +250,15 @@ private extension NotificationView {
}
self.accessibilityAttributedLabel = accessibilityAttributedLabel
accessibilityCustomActions = [
UIAccessibilityCustomAction(
name: NSLocalizedString("notification.accessibility.view-profile", comment: "")) { [weak self] _ in
self?.notificationConfiguration.viewModel.accountSelected()
return true
}
]
}
// swiftlint:enable function_body_length
}