Create handleUnreadCountDidChange as shared AppDelegate code.

This commit is contained in:
Brent Simmons
2024-07-02 21:43:52 -07:00
parent 79c2f4c7f5
commit 09cadf7f52
3 changed files with 20 additions and 6 deletions

View File

@@ -46,9 +46,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
var unreadCount = 0 {
didSet {
if unreadCount != oldValue {
AppNotification.postAppUnreadCountDidChange(from: self, unreadCount: unreadCount)
postUnreadCountDidChangeNotification()
UNUserNotificationCenter.current().setBadgeCount(unreadCount)
handleUnreadCountDidChange()
}
}
}