feat(settings): Notifications comment-posted/mentioned toggles

"Mentioned" groups comments.mentioned + documents.mentioned under one
visible toggle, per Outline's own settings copy.
This commit is contained in:
2026-08-17 21:52:25 +01:00
parent 8faa94f3cc
commit a1df1b3d3d
@@ -575,6 +575,20 @@ struct SettingsView: View {
isOn: session.userNotificationSettings?[NotificationEventType.documentUpdate.rawValue] ?? false,
onChange: { newValue in Task { await setNotifications([.documentUpdate], subscribed: newValue) } }
)
Divider()
notificationToggleRow(
"Comment posted",
description: "Receive a notification when a document you are subscribed to or a thread you participated in receives a comment",
isOn: session.userNotificationSettings?[NotificationEventType.commentCreate.rawValue] ?? false,
onChange: { newValue in Task { await setNotifications([.commentCreate], subscribed: newValue) } }
)
Divider()
notificationToggleRow(
"Mentioned",
description: "Receive a notification when someone mentions you in a document or comment",
isOn: [NotificationEventType.commentMentioned, .documentMentioned].allSatisfy { session.userNotificationSettings?[$0.rawValue] ?? false },
onChange: { newValue in Task { await setNotifications([.commentMentioned, .documentMentioned], subscribed: newValue) } }
)
if let notificationsErrorMessage {
Text(notificationsErrorMessage)