mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:06:00 +00:00
Add a setting to hide unread messages badges. (#2412)
* Add a setting to hide grey unread messages badges. * Move room badge logic to be built in the view model instead of in the view. * Move setting into DeveloperOptions.
This commit is contained in:
+1
-1
@@ -39,7 +39,7 @@ class NotificationSettingsScreenViewModel: NotificationSettingsScreenViewModelTy
|
||||
let bindings = NotificationSettingsScreenViewStateBindings(enableNotifications: appSettings.enableNotifications)
|
||||
super.init(initialViewState: NotificationSettingsScreenViewState(bindings: bindings, isModallyPresented: isModallyPresented))
|
||||
|
||||
// Listen for changes to AppSettings.enableNotifications
|
||||
// Listen for changes to AppSettings.
|
||||
appSettings.$enableNotifications
|
||||
.weakAssign(to: \.state.bindings.enableNotifications, on: self)
|
||||
.store(in: &cancellables)
|
||||
|
||||
+5
@@ -28,15 +28,20 @@ struct NotificationSettingsScreen: View {
|
||||
if context.viewState.showSystemNotificationsAlert {
|
||||
userPermissionSection
|
||||
}
|
||||
|
||||
enableNotificationSection
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user