Fix #1769
This commit is contained in:
parent
f3a48118f0
commit
ede45a9d46
|
@ -103,6 +103,9 @@ struct NotificationsTab: View {
|
|||
if selectedTab == .notifications || isSecondaryColumn {
|
||||
if let token = appAccount.currentAccount.oauthToken {
|
||||
userPreferences.notificationsCount[token] = 0
|
||||
Task {
|
||||
let _: ServerError = try await client.post(endpoint: Notifications.clear)
|
||||
}
|
||||
}
|
||||
watcher.unreadNotificationsCount = 0
|
||||
}
|
||||
|
|
|
@ -162,13 +162,6 @@ import SwiftUI
|
|||
}
|
||||
}
|
||||
|
||||
func clear() async {
|
||||
guard let client else { return }
|
||||
do {
|
||||
let _: ServerError = try await client.post(endpoint: Notifications.clear)
|
||||
} catch {}
|
||||
}
|
||||
|
||||
func handleEvent(event: any StreamEvent) {
|
||||
Task {
|
||||
// Check if the event is a notification,
|
||||
|
|
Loading…
Reference in New Issue