mirror of
https://github.com/mastodon/mastodon-ios
synced 2025-04-11 22:58:02 +02:00
Voice Over improvements
Contributes to IOS-398
This commit is contained in:
parent
32d897e557
commit
db502f569f
@ -170,7 +170,7 @@ struct NotificationPolicyView: View {
|
||||
}
|
||||
.background(Color(uiColor: .systemGroupedBackground))
|
||||
|
||||
// Close button
|
||||
// Dismiss button
|
||||
Button {
|
||||
viewModel.dismissView?()
|
||||
} label: {
|
||||
@ -209,6 +209,7 @@ struct NotificationPolicyView: View {
|
||||
.multilineTextAlignment(.leading)
|
||||
.font(.subheadline)
|
||||
}
|
||||
.accessibilityElement(children: .combine)
|
||||
|
||||
Spacer()
|
||||
|
||||
@ -300,12 +301,11 @@ extension NotificationPolicyView {
|
||||
.padding(7)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.onTapGesture {
|
||||
withAnimation {
|
||||
if viewModel.value(forItem: filterItem) != option {
|
||||
viewModel.setValue(option, forItem: filterItem)
|
||||
}
|
||||
viewModel.isShowingMenu = nil
|
||||
}
|
||||
updateSelectedOption(option, for: filterItem)
|
||||
}
|
||||
.accessibilityElement(children: .combine)
|
||||
.accessibilityAction {
|
||||
updateSelectedOption(option, for: filterItem)
|
||||
}
|
||||
|
||||
if option != .drop {
|
||||
@ -324,6 +324,13 @@ extension NotificationPolicyView {
|
||||
.shadow(radius: 5)
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate func updateSelectedOption(_ option: FilterAction, for filterItem: NotificationPolicyViewModel.NotificationFilterItem) {
|
||||
if viewModel.value(forItem: filterItem) != option {
|
||||
viewModel.setValue(option, forItem: filterItem)
|
||||
}
|
||||
viewModel.isShowingMenu = nil
|
||||
}
|
||||
}
|
||||
|
||||
@MainActor
|
||||
|
Loading…
x
Reference in New Issue
Block a user