diff options
Diffstat (limited to 'modules/expo-background-notification-handler/ios')
-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") + } } } |