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 {
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e8f79c9513c86d144dcf8bc10d1415d6830fbbc0e912f0a57c9991788bf336d5
|
||||
size 150471
|
||||
oid sha256:d3508ea754a5efc09e5a9351b786ee3273f9ffe0b89236e7c6258d57f9237225
|
||||
size 140045
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2a5abb3d6dcde7150b3a91368e4b2e61f17658bb0192767d5f53098ec7b58da0
|
||||
size 172850
|
||||
oid sha256:6c5e166aaf2c10bc2c5c186700025e580319d7ee9e99fc314b310b2972106b92
|
||||
size 158148
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:27d2ad84cc07ecf71b817ca3cb3d54ca106dcaf19546298b2b26f98b2fd05b6d
|
||||
size 97875
|
||||
oid sha256:1dd7cc85d17efed4a7460dbd63ba93614461062e2d49f24b9084418266091b2e
|
||||
size 89349
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f770161825924d24135c9ceb1f19a2d0129b4cbbd9557d9d75eac89f8218104a
|
||||
size 137182
|
||||
oid sha256:51702e69725052c626c60aa6d374df00fa8169df82616bf38528796bcaeb6ae0
|
||||
size 126429
|
||||
|
||||
Reference in New Issue
Block a user