mirror of
https://codeberg.org/secana/Forji.git
synced 2026-06-16 05:13:55 -07:00
fix: update the app icon badge in multi-instance mode (#58)
This commit is contained in:
parent
8e56b9d722
commit
4ef76cf2d7
1 changed files with 6 additions and 2 deletions
|
|
@ -99,11 +99,15 @@ struct HomeView: View {
|
|||
} else if let notificationService {
|
||||
do {
|
||||
unreadCount = try await notificationService.fetchUnreadCount()
|
||||
try? await UNUserNotificationCenter.current().setBadgeCount(unreadCount)
|
||||
} catch {
|
||||
// Silently ignore — badge is non-critical
|
||||
// Silently ignore — badge is non-critical, keep the prior count
|
||||
return
|
||||
}
|
||||
} else {
|
||||
return
|
||||
}
|
||||
// Mirror the in-app tab badge to the system app icon badge in both modes
|
||||
try? await UNUserNotificationCenter.current().setBadgeCount(unreadCount)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue