mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +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_all" = "All";
|
||||||
"screen_notification_settings_mode_mentions" = "Mentions";
|
"screen_notification_settings_mode_mentions" = "Mentions";
|
||||||
"screen_notification_settings_notification_section_title" = "Notify me for";
|
"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_fallback" = "Custom";
|
||||||
"screen_notification_settings_sound_custom_sound_button_title" = "Custom sound...";
|
"screen_notification_settings_sound_custom_sound_button_title" = "Custom sound...";
|
||||||
"screen_notification_settings_sound_delete_sound_error_title" = "Error deleting file";
|
"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_all" = "All";
|
||||||
"screen_notification_settings_mode_mentions" = "Mentions";
|
"screen_notification_settings_mode_mentions" = "Mentions";
|
||||||
"screen_notification_settings_notification_section_title" = "Notify me for";
|
"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_fallback" = "Custom";
|
||||||
"screen_notification_settings_sound_custom_sound_button_title" = "Custom sound...";
|
"screen_notification_settings_sound_custom_sound_button_title" = "Custom sound...";
|
||||||
"screen_notification_settings_sound_delete_sound_error_title" = "Error deleting file";
|
"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") }
|
internal static var screenNotificationSettingsModeMentions: String { return L10n.tr("Localizable", "screen_notification_settings_mode_mentions") }
|
||||||
/// Notify me for
|
/// Notify me for
|
||||||
internal static var screenNotificationSettingsNotificationSectionTitle: String { return L10n.tr("Localizable", "screen_notification_settings_notification_section_title") }
|
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") }
|
internal static var screenNotificationSettingsRoomMentionLabel: String { return L10n.tr("Localizable", "screen_notification_settings_room_mention_label") }
|
||||||
/// Custom
|
/// Custom
|
||||||
internal static var screenNotificationSettingsSoundCustomFallback: String { return L10n.tr("Localizable", "screen_notification_settings_sound_custom_fallback") }
|
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 {
|
if context.enableNotifications {
|
||||||
roomsNotificationSection
|
roomsNotificationSection
|
||||||
|
|
||||||
if context.viewState.settings?.roomMentionsEnabled != nil {
|
|
||||||
mentionsSection
|
|
||||||
}
|
|
||||||
|
|
||||||
if context.viewState.showCallsSettings, context.viewState.settings?.callsEnabled != nil {
|
if context.viewState.showCallsSettings, context.viewState.settings?.callsEnabled != nil {
|
||||||
callsSection
|
callsSection
|
||||||
}
|
}
|
||||||
|
|
||||||
if context.viewState.settings?.invitationsEnabled != nil {
|
|
||||||
additionalSettingsSection
|
|
||||||
}
|
|
||||||
|
|
||||||
if context.viewState.customToneSelectionEnabled {
|
if context.viewState.customToneSelectionEnabled {
|
||||||
soundSelectionSection
|
soundSelectionSection
|
||||||
}
|
}
|
||||||
@@ -123,14 +115,16 @@ struct NotificationSettingsScreen: View {
|
|||||||
.disabled(context.viewState.settings == nil)
|
.disabled(context.viewState.settings == nil)
|
||||||
.accessibilityIdentifier(A11yIdentifiers.roomDetailsScreen.notifications)
|
.accessibilityIdentifier(A11yIdentifiers.roomDetailsScreen.notifications)
|
||||||
|
|
||||||
} header: {
|
// Invitations
|
||||||
Text(L10n.screenNotificationSettingsNotificationSectionTitle)
|
ListRow(label: .plain(title: L10n.screenNotificationSettingsInviteForMeLabel),
|
||||||
.compoundListSectionHeader()
|
kind: .toggle($context.invitationsEnabled))
|
||||||
}
|
.disabled(context.viewState.settings?.invitationsEnabled == nil)
|
||||||
}
|
.allowsHitTesting(!context.viewState.applyingChange)
|
||||||
|
.onChange(of: context.invitationsEnabled) {
|
||||||
private var mentionsSection: some View {
|
context.send(viewAction: .invitationsChanged)
|
||||||
Section {
|
}
|
||||||
|
|
||||||
|
// @room mentions
|
||||||
ListRow(label: .plain(title: L10n.screenNotificationSettingsRoomMentionLabel),
|
ListRow(label: .plain(title: L10n.screenNotificationSettingsRoomMentionLabel),
|
||||||
kind: .toggle($context.roomMentionsEnabled))
|
kind: .toggle($context.roomMentionsEnabled))
|
||||||
.disabled(context.viewState.settings?.roomMentionsEnabled == nil)
|
.disabled(context.viewState.settings?.roomMentionsEnabled == nil)
|
||||||
@@ -138,8 +132,9 @@ struct NotificationSettingsScreen: View {
|
|||||||
.onChange(of: context.roomMentionsEnabled) {
|
.onChange(of: context.roomMentionsEnabled) {
|
||||||
context.send(viewAction: .roomMentionChanged)
|
context.send(viewAction: .roomMentionChanged)
|
||||||
}
|
}
|
||||||
|
|
||||||
} header: {
|
} header: {
|
||||||
Text(L10n.screenNotificationSettingsMentionsSectionTitle)
|
Text(L10n.screenNotificationSettingsNotificationSectionTitle)
|
||||||
.compoundListSectionHeader()
|
.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
|
@ViewBuilder
|
||||||
private var soundSelectionSection: some View {
|
private var soundSelectionSection: some View {
|
||||||
Section {
|
Section {
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:e8f79c9513c86d144dcf8bc10d1415d6830fbbc0e912f0a57c9991788bf336d5
|
oid sha256:d3508ea754a5efc09e5a9351b786ee3273f9ffe0b89236e7c6258d57f9237225
|
||||||
size 150471
|
size 140045
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:2a5abb3d6dcde7150b3a91368e4b2e61f17658bb0192767d5f53098ec7b58da0
|
oid sha256:6c5e166aaf2c10bc2c5c186700025e580319d7ee9e99fc314b310b2972106b92
|
||||||
size 172850
|
size 158148
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:27d2ad84cc07ecf71b817ca3cb3d54ca106dcaf19546298b2b26f98b2fd05b6d
|
oid sha256:1dd7cc85d17efed4a7460dbd63ba93614461062e2d49f24b9084418266091b2e
|
||||||
size 97875
|
size 89349
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:f770161825924d24135c9ceb1f19a2d0129b4cbbd9557d9d75eac89f8218104a
|
oid sha256:51702e69725052c626c60aa6d374df00fa8169df82616bf38528796bcaeb6ae0
|
||||||
size 137182
|
size 126429
|
||||||
|
|||||||
Reference in New Issue
Block a user