feat(settings): Notifications document-published/document-updated toggles
This commit is contained in:
@@ -562,6 +562,19 @@ struct SettingsView: View {
|
|||||||
|
|
||||||
allNotificationsRow
|
allNotificationsRow
|
||||||
Divider()
|
Divider()
|
||||||
|
notificationToggleRow(
|
||||||
|
"Document published",
|
||||||
|
description: "Receive a notification whenever a new document is published",
|
||||||
|
isOn: session.userNotificationSettings?[NotificationEventType.documentPublish.rawValue] ?? false,
|
||||||
|
onChange: { newValue in Task { await setNotifications([.documentPublish], subscribed: newValue) } }
|
||||||
|
)
|
||||||
|
Divider()
|
||||||
|
notificationToggleRow(
|
||||||
|
"Document updated",
|
||||||
|
description: "Receive a notification when a document you are subscribed to is edited",
|
||||||
|
isOn: session.userNotificationSettings?[NotificationEventType.documentUpdate.rawValue] ?? false,
|
||||||
|
onChange: { newValue in Task { await setNotifications([.documentUpdate], subscribed: newValue) } }
|
||||||
|
)
|
||||||
|
|
||||||
if let notificationsErrorMessage {
|
if let notificationsErrorMessage {
|
||||||
Text(notificationsErrorMessage)
|
Text(notificationsErrorMessage)
|
||||||
|
|||||||
Reference in New Issue
Block a user