mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-16 12:16:42 +00:00
Fix #1769
This commit is contained in:
parent
f3a48118f0
commit
ede45a9d46
2 changed files with 3 additions and 7 deletions
|
@ -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 a new issue