Updates to Notification Settings (#6075)

* Updates to Notification Settings

Move "Invitations" and "Notify me on @room" to the section labeled "Notify me for"

* Record preview snapshots

* Update @room mentions label.
This commit is contained in:
Aaron Thornburgh
2026-08-27 15:21:15 +02:00
committed by GitHub
parent 2b9ec0336d
commit 600b9224b3
8 changed files with 23 additions and 43 deletions
+1 -1
View File
@@ -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") }
@@ -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 {