summaryrefslogtreecommitdiff
path: root/Juick/AppDelegate.m
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/AppDelegate.m')
-rw-r--r--Juick/AppDelegate.m1
1 files changed, 1 insertions, 0 deletions
diff --git a/Juick/AppDelegate.m b/Juick/AppDelegate.m
index d5d5b9b..950f473 100644
--- a/Juick/AppDelegate.m
+++ b/Juick/AppDelegate.m
@@ -104,6 +104,7 @@
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
if (userInfo[@"service"]) {
+ application.applicationIconBadgeNumber = [userInfo[@"user"][@"unreadCount"] integerValue];
[[UNUserNotificationCenter currentNotificationCenter] getDeliveredNotificationsWithCompletionHandler:^(NSArray<UNNotification *> * _Nonnull notifications) {
for (UNNotification* notification in notifications) {
if ([notification.request.content.userInfo[@"mid"] integerValue] == [userInfo[@"mid"] integerValue]) {