mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
New notifications section in settings (#1273)
This commit is contained in:
@@ -40,6 +40,7 @@ class SettingsScreenViewModel: SettingsScreenViewModelType, SettingsScreenViewMo
|
||||
deviceID: userSession.deviceID,
|
||||
userID: userSession.userID,
|
||||
showSessionVerificationSection: showSessionVerificationSection,
|
||||
showNotificationSettings: appSettings.notificationSettingsEnabled,
|
||||
showDeveloperOptions: appSettings.canShowDeveloperOptions),
|
||||
imageProvider: userSession.mediaProvider)
|
||||
|
||||
@@ -51,6 +52,10 @@ class SettingsScreenViewModel: SettingsScreenViewModelType, SettingsScreenViewMo
|
||||
.weakAssign(to: \.state.userAvatarURL, on: self)
|
||||
.store(in: &cancellables)
|
||||
|
||||
appSettings.$notificationSettingsEnabled
|
||||
.weakAssign(to: \.state.showNotificationSettings, on: self)
|
||||
.store(in: &cancellables)
|
||||
|
||||
Task {
|
||||
await userSession.clientProxy.loadUserAvatarURL()
|
||||
}
|
||||
@@ -92,6 +97,8 @@ class SettingsScreenViewModel: SettingsScreenViewModelType, SettingsScreenViewMo
|
||||
callback?(.sessionVerification)
|
||||
case .changedTimelineStyle:
|
||||
appSettings.timelineStyle = state.bindings.timelineStyle
|
||||
case .notifications:
|
||||
callback?(.notifications)
|
||||
case .developerOptions:
|
||||
callback?(.developerOptions)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user