Added a disclaimer in Notification Settings for "Mentions Only" (#2081)

This commit is contained in:
Mauro
2023-11-15 15:57:17 +01:00
committed by GitHub
parent eb6f7e0409
commit 342feb4113
27 changed files with 244 additions and 39 deletions
@@ -61,6 +61,15 @@ struct RoomNotificationSettingsScreenViewState: BindableState {
var navigationTitle: String
var customSettingsSectionHeader: String
var deletingCustomSetting = false
var shouldDisplayMentionsOnlyDisclaimer = true
func description(mode: RoomNotificationModeProxy) -> String? {
guard mode == .mentionsAndKeywordsOnly,
shouldDisplayMentionsOnlyDisclaimer else {
return nil
}
return L10n.screenRoomNotificationSettingsMentionsOnlyDisclaimer
}
func isSelected(mode: RoomNotificationModeProxy) -> Bool {
if case .loaded(let settings) = notificationSettingsState, settings.mode == mode, pendingCustomMode == nil {