From 62b15b8b900bb1f772d775e8c418196851542f56 Mon Sep 17 00:00:00 2001 From: Ryan ZHAO <> Date: Mon, 26 Aug 2024 11:19:47 +1000 Subject: [PATCH] add some accessibility ids --- .../Conversations/Settings/ThreadSettingsViewModel.swift | 9 +++++++++ Session/Settings/ConversationSettingsViewModel.swift | 6 ++++++ Session/Settings/NotificationSettingsViewModel.swift | 6 ++++++ 3 files changed, 21 insertions(+) diff --git a/Session/Conversations/Settings/ThreadSettingsViewModel.swift b/Session/Conversations/Settings/ThreadSettingsViewModel.swift index 70a8baa9e..30bbe83d4 100644 --- a/Session/Conversations/Settings/ThreadSettingsViewModel.swift +++ b/Session/Conversations/Settings/ThreadSettingsViewModel.swift @@ -578,6 +578,9 @@ class ThreadSettingsViewModel: SessionTableViewModel, NavigationItemSource, Navi .boolValue( threadViewModel.threadOnlyNotifyForMentions == true, oldValue: ((previous?.threadViewModel ?? threadViewModel).threadOnlyNotifyForMentions == true) + ), + accessibility: Accessibility( + identifier: "Notify for Mentions Only - Switch" ) ), isEnabled: ( @@ -619,6 +622,9 @@ class ThreadSettingsViewModel: SessionTableViewModel, NavigationItemSource, Navi .boolValue( threadViewModel.threadMutedUntilTimestamp != nil, oldValue: ((previous?.threadViewModel ?? threadViewModel).threadMutedUntilTimestamp != nil) + ), + accessibility: Accessibility( + identifier: "Mute - Switch" ) ), isEnabled: ( @@ -668,6 +674,9 @@ class ThreadSettingsViewModel: SessionTableViewModel, NavigationItemSource, Navi .boolValue( threadViewModel.threadIsBlocked == true, oldValue: ((previous?.threadViewModel ?? threadViewModel).threadIsBlocked == true) + ), + accessibility: Accessibility( + identifier: "Block This User - Switch" ) ), accessibility: Accessibility( diff --git a/Session/Settings/ConversationSettingsViewModel.swift b/Session/Settings/ConversationSettingsViewModel.swift index 33c66234e..c190effd9 100644 --- a/Session/Settings/ConversationSettingsViewModel.swift +++ b/Session/Settings/ConversationSettingsViewModel.swift @@ -74,6 +74,9 @@ class ConversationSettingsViewModel: SessionTableViewModel, NavigatableStateHold key: .trimOpenGroupMessagesOlderThanSixMonths, value: current.trimOpenGroupMessagesOlderThanSixMonths, oldValue: (previous ?? current).trimOpenGroupMessagesOlderThanSixMonths + ), + accessibility: Accessibility( + identifier: "Trim Communities - Switch" ) ), onTap: { @@ -96,6 +99,9 @@ class ConversationSettingsViewModel: SessionTableViewModel, NavigatableStateHold key: .shouldAutoPlayConsecutiveAudioMessages, value: current.shouldAutoPlayConsecutiveAudioMessages, oldValue: (previous ?? current).shouldAutoPlayConsecutiveAudioMessages + ), + accessibility: Accessibility( + identifier: "Autoplay Audio Messages - Switch" ) ), onTap: { diff --git a/Session/Settings/NotificationSettingsViewModel.swift b/Session/Settings/NotificationSettingsViewModel.swift index 6943b4fa6..4c05c66f5 100644 --- a/Session/Settings/NotificationSettingsViewModel.swift +++ b/Session/Settings/NotificationSettingsViewModel.swift @@ -93,6 +93,9 @@ class NotificationSettingsViewModel: SessionTableViewModel, NavigatableStateHold .boolValue( current.isUsingFullAPNs, oldValue: (previous ?? current).isUsingFullAPNs + ), + accessibility: Accessibility( + identifier: "Use Fast Mode - Switch" ) ), styling: SessionCell.StyleInfo( @@ -148,6 +151,9 @@ class NotificationSettingsViewModel: SessionTableViewModel, NavigatableStateHold key: .playNotificationSoundInForeground, value: current.playNotificationSoundInForeground, oldValue: (previous ?? current).playNotificationSoundInForeground + ), + accessibility: Accessibility( + identifier: "Sound when App is open - Switch" ) ), onTap: {