New notifications section in settings (#1273)

This commit is contained in:
Nicolas Mauri
2023-07-10 19:26:49 +02:00
committed by GitHub
parent 2cec1858ff
commit 5ae227179c
26 changed files with 639 additions and 14 deletions
@@ -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)
}