Add name parameter to PostponingBlock. Add notification appUnreadCountDidChange for when unread count changes for entire app.

This commit is contained in:
Brent Simmons
2024-06-09 22:27:17 -07:00
parent 3e53dfbfc6
commit 5d066e5d5c
7 changed files with 15 additions and 12 deletions

View File

@@ -50,6 +50,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
var unreadCount = 0 {
didSet {
if unreadCount != oldValue {
NotificationCenter.default.post(name: .appUnreadCountDidChange, object: self, userInfo: nil)
postUnreadCountDidChangeNotification()
UNUserNotificationCenter.current().setBadgeCount(unreadCount)
}