diff options
author | Hailey <me@haileyok.com> | 2024-06-07 15:15:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-07 15:15:33 -0700 |
commit | 480a40862f329f98a37772f01fd774d0e6d89a9e (patch) | |
tree | ad39ad65806cb51694d0a92feee8337c7f454aa4 /modules/expo-background-notification-handler/ios/ExpoBackgroundNotificationHandlerModule.swift | |
parent | c58aedf050ea96ece27549b4c5a084611473db9d (diff) | |
download | voidsky-480a40862f329f98a37772f01fd774d0e6d89a9e.tar.zst |
Use the proper logic on iOS to increment the badge (#4233)
Diffstat (limited to 'modules/expo-background-notification-handler/ios/ExpoBackgroundNotificationHandlerModule.swift')
-rw-r--r-- | modules/expo-background-notification-handler/ios/ExpoBackgroundNotificationHandlerModule.swift | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/expo-background-notification-handler/ios/ExpoBackgroundNotificationHandlerModule.swift b/modules/expo-background-notification-handler/ios/ExpoBackgroundNotificationHandlerModule.swift index 08972a04c..5f8c7fc3b 100644 --- a/modules/expo-background-notification-handler/ios/ExpoBackgroundNotificationHandlerModule.swift +++ b/modules/expo-background-notification-handler/ios/ExpoBackgroundNotificationHandlerModule.swift @@ -10,7 +10,8 @@ let DEFAULTS: [String:Any] = [ "playSoundQuote": false, "playSoundReply": false, "playSoundRepost": false, - "mutedThreads": [:] as! [String:[String]] + "mutedThreads": [:] as! [String:[String]], + "badgeCount": 0, ] /* @@ -112,5 +113,9 @@ public class ExpoBackgroundNotificationHandlerModule: Module { userDefaults?.setValue(curr, forKey: forKey) } } + + AsyncFunction("setBadgeCountAsync") { (count: Int) in + userDefaults?.setValue(count, forKey: "badgeCount") + } } } |