New items indicator improvements

This commit is contained in:
Justin Mazzocchi 2021-02-24 22:33:27 -08:00
parent ab2ad57d6f
commit b94f63b94b
No known key found for this signature in database
GPG Key ID: E223E6937AAFB01C
2 changed files with 7 additions and 1 deletions

View File

@ -108,6 +108,7 @@
"compose-button.accessibility-label.post" = "Compose Post"; "compose-button.accessibility-label.post" = "Compose Post";
"compose-button.accessibility-label.toot" = "Compose Toot"; "compose-button.accessibility-label.toot" = "Compose Toot";
"conversation.unread" = "Unread"; "conversation.unread" = "Unread";
"dismiss" = "Dismiss";
"emoji.custom" = "Custom"; "emoji.custom" = "Custom";
"emoji.default-skin-tone" = "Default skin tone"; "emoji.default-skin-tone" = "Default skin tone";
"emoji.default-skin-tone-button.accessibility-label" = "Select default skin tone"; "emoji.default-skin-tone-button.accessibility-label" = "Select default skin tone";

View File

@ -90,6 +90,11 @@ class TableViewController: UITableViewController {
self?.hideNewItemsView() self?.hideNewItemsView()
}, },
for: .touchUpInside) for: .touchUpInside)
newItemsView.button.accessibilityCustomActions = [
UIAccessibilityCustomAction(name: NSLocalizedString("dismiss", comment: "")) { [weak self] _ in
self?.hideNewItemsView()
return true
}]
setupViewModelBindings() setupViewModelBindings()
@ -111,7 +116,7 @@ class TableViewController: UITableViewController {
loadMoreView.directionChanged(up: up) loadMoreView.directionChanged(up: up)
} }
if up, newItemsView.alpha > 0 { if newItemsView.alpha > 0 {
hideNewItemsView() hideNewItemsView()
} }
} }