diff --git a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings index 4d04fc48c..7a8a7cf2d 100644 --- a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings @@ -1080,7 +1080,7 @@ "screen_notification_settings_mode_all" = "All"; "screen_notification_settings_mode_mentions" = "Mentions"; "screen_notification_settings_notification_section_title" = "Notify me for"; -"screen_notification_settings_room_mention_label" = "Notify me on @room"; +"screen_notification_settings_room_mention_label" = "Mentions of @room"; "screen_notification_settings_sound_custom_fallback" = "Custom"; "screen_notification_settings_sound_custom_sound_button_title" = "Custom sound..."; "screen_notification_settings_sound_delete_sound_error_title" = "Error deleting file"; diff --git a/ElementX/Resources/Localizations/en.lproj/Localizable.strings b/ElementX/Resources/Localizations/en.lproj/Localizable.strings index 2883de9b7..c32d70abe 100644 --- a/ElementX/Resources/Localizations/en.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en.lproj/Localizable.strings @@ -1080,7 +1080,7 @@ "screen_notification_settings_mode_all" = "All"; "screen_notification_settings_mode_mentions" = "Mentions"; "screen_notification_settings_notification_section_title" = "Notify me for"; -"screen_notification_settings_room_mention_label" = "Notify me on @room"; +"screen_notification_settings_room_mention_label" = "Mentions of @room"; "screen_notification_settings_sound_custom_fallback" = "Custom"; "screen_notification_settings_sound_custom_sound_button_title" = "Custom sound..."; "screen_notification_settings_sound_delete_sound_error_title" = "Error deleting file"; diff --git a/ElementX/Sources/Generated/Strings.swift b/ElementX/Sources/Generated/Strings.swift index a63d3a5f0..d233b6abb 100644 --- a/ElementX/Sources/Generated/Strings.swift +++ b/ElementX/Sources/Generated/Strings.swift @@ -2530,7 +2530,7 @@ internal nonisolated enum L10n { internal static var screenNotificationSettingsModeMentions: String { return L10n.tr("Localizable", "screen_notification_settings_mode_mentions") } /// Notify me for internal static var screenNotificationSettingsNotificationSectionTitle: String { return L10n.tr("Localizable", "screen_notification_settings_notification_section_title") } - /// Notify me on @room + /// Mentions of @room internal static var screenNotificationSettingsRoomMentionLabel: String { return L10n.tr("Localizable", "screen_notification_settings_room_mention_label") } /// Custom internal static var screenNotificationSettingsSoundCustomFallback: String { return L10n.tr("Localizable", "screen_notification_settings_sound_custom_fallback") } diff --git a/ElementX/Sources/Screens/Settings/NotificationSettingsScreen/View/NotificationSettingsScreen.swift b/ElementX/Sources/Screens/Settings/NotificationSettingsScreen/View/NotificationSettingsScreen.swift index 0db1b8446..415d7e4c8 100644 --- a/ElementX/Sources/Screens/Settings/NotificationSettingsScreen/View/NotificationSettingsScreen.swift +++ b/ElementX/Sources/Screens/Settings/NotificationSettingsScreen/View/NotificationSettingsScreen.swift @@ -27,18 +27,10 @@ struct NotificationSettingsScreen: View { if context.enableNotifications { roomsNotificationSection - if context.viewState.settings?.roomMentionsEnabled != nil { - mentionsSection - } - if context.viewState.showCallsSettings, context.viewState.settings?.callsEnabled != nil { callsSection } - if context.viewState.settings?.invitationsEnabled != nil { - additionalSettingsSection - } - if context.viewState.customToneSelectionEnabled { soundSelectionSection } @@ -123,14 +115,16 @@ struct NotificationSettingsScreen: View { .disabled(context.viewState.settings == nil) .accessibilityIdentifier(A11yIdentifiers.roomDetailsScreen.notifications) - } header: { - Text(L10n.screenNotificationSettingsNotificationSectionTitle) - .compoundListSectionHeader() - } - } - - private var mentionsSection: some View { - Section { + // Invitations + ListRow(label: .plain(title: L10n.screenNotificationSettingsInviteForMeLabel), + kind: .toggle($context.invitationsEnabled)) + .disabled(context.viewState.settings?.invitationsEnabled == nil) + .allowsHitTesting(!context.viewState.applyingChange) + .onChange(of: context.invitationsEnabled) { + context.send(viewAction: .invitationsChanged) + } + + // @room mentions ListRow(label: .plain(title: L10n.screenNotificationSettingsRoomMentionLabel), kind: .toggle($context.roomMentionsEnabled)) .disabled(context.viewState.settings?.roomMentionsEnabled == nil) @@ -138,8 +132,9 @@ struct NotificationSettingsScreen: View { .onChange(of: context.roomMentionsEnabled) { context.send(viewAction: .roomMentionChanged) } + } header: { - Text(L10n.screenNotificationSettingsMentionsSectionTitle) + Text(L10n.screenNotificationSettingsNotificationSectionTitle) .compoundListSectionHeader() } } @@ -159,21 +154,6 @@ struct NotificationSettingsScreen: View { } } - private var additionalSettingsSection: some View { - Section { - ListRow(label: .plain(title: L10n.screenNotificationSettingsInviteForMeLabel), - kind: .toggle($context.invitationsEnabled)) - .disabled(context.viewState.settings?.invitationsEnabled == nil) - .allowsHitTesting(!context.viewState.applyingChange) - .onChange(of: context.invitationsEnabled) { - context.send(viewAction: .invitationsChanged) - } - } header: { - Text(L10n.screenNotificationSettingsAdditionalSettingsSectionTitle) - .compoundListSectionHeader() - } - } - @ViewBuilder private var soundSelectionSection: some View { Section { diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/notificationSettingsScreen.iPad-en-GB-0.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/notificationSettingsScreen.iPad-en-GB-0.png index c784322db..09b4fcd9f 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/notificationSettingsScreen.iPad-en-GB-0.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/notificationSettingsScreen.iPad-en-GB-0.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e8f79c9513c86d144dcf8bc10d1415d6830fbbc0e912f0a57c9991788bf336d5 -size 150471 +oid sha256:d3508ea754a5efc09e5a9351b786ee3273f9ffe0b89236e7c6258d57f9237225 +size 140045 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/notificationSettingsScreen.iPad-pseudo-0.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/notificationSettingsScreen.iPad-pseudo-0.png index 818a6fa57..cf7f4c241 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/notificationSettingsScreen.iPad-pseudo-0.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/notificationSettingsScreen.iPad-pseudo-0.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2a5abb3d6dcde7150b3a91368e4b2e61f17658bb0192767d5f53098ec7b58da0 -size 172850 +oid sha256:6c5e166aaf2c10bc2c5c186700025e580319d7ee9e99fc314b310b2972106b92 +size 158148 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/notificationSettingsScreen.iPhone-en-GB-0.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/notificationSettingsScreen.iPhone-en-GB-0.png index dcb724a6b..68cdfe343 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/notificationSettingsScreen.iPhone-en-GB-0.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/notificationSettingsScreen.iPhone-en-GB-0.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:27d2ad84cc07ecf71b817ca3cb3d54ca106dcaf19546298b2b26f98b2fd05b6d -size 97875 +oid sha256:1dd7cc85d17efed4a7460dbd63ba93614461062e2d49f24b9084418266091b2e +size 89349 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/notificationSettingsScreen.iPhone-pseudo-0.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/notificationSettingsScreen.iPhone-pseudo-0.png index ff248f03f..eb2d45fe1 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/notificationSettingsScreen.iPhone-pseudo-0.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/notificationSettingsScreen.iPhone-pseudo-0.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f770161825924d24135c9ceb1f19a2d0129b4cbbd9557d9d75eac89f8218104a -size 137182 +oid sha256:51702e69725052c626c60aa6d374df00fa8169df82616bf38528796bcaeb6ae0 +size 126429