mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
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:
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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") }
|
||||
|
||||
+12
-32
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user