mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-16 12:49:59 +02:00
SYIOS-202: IOS should no longer reset badge count on launch
This commit is contained in:
+16
-15
@@ -270,7 +270,7 @@
|
||||
NSLog(@"[AppDelegate] didFinishLaunchingWithOptions: clear the notifications");
|
||||
|
||||
// clear the notifications counter
|
||||
[self clearNotifications];
|
||||
// [self clearNotifications];
|
||||
}
|
||||
|
||||
return YES;
|
||||
@@ -338,7 +338,7 @@
|
||||
}
|
||||
|
||||
// clear the notifications counter
|
||||
[self clearNotifications];
|
||||
// [self clearNotifications];
|
||||
|
||||
// cancel any background sync before resuming
|
||||
// i.e. warn IOS that there is no new data with any received push.
|
||||
@@ -352,8 +352,9 @@
|
||||
NSLog(@"[AppDelegate] applicationWillEnterForeground");
|
||||
|
||||
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
|
||||
|
||||
// clear the notifications counter
|
||||
[self clearNotifications];
|
||||
// [self clearNotifications];
|
||||
|
||||
_isAppForeground = YES;
|
||||
}
|
||||
@@ -642,18 +643,18 @@
|
||||
completionHandler(UIBackgroundFetchResultNoData);
|
||||
}
|
||||
|
||||
- (void)clearNotifications
|
||||
{
|
||||
NSLog(@"[AppDelegate] clearNotifications");
|
||||
|
||||
// force to clear the notification center
|
||||
// switching from 0 -> 1 -> 0 seems forcing the notifications center to refresh
|
||||
// so resetting it does not clear the notifications center.
|
||||
[UIApplication sharedApplication].applicationIconBadgeNumber = 1;
|
||||
[UIApplication sharedApplication].applicationIconBadgeNumber = 0;
|
||||
|
||||
[[UIApplication sharedApplication] cancelAllLocalNotifications];
|
||||
}
|
||||
//- (void)clearNotifications
|
||||
//{
|
||||
// NSLog(@"[AppDelegate] clearNotifications");
|
||||
//
|
||||
// // force to clear the notification center
|
||||
// // switching from 0 -> 1 -> 0 seems forcing the notifications center to refresh
|
||||
// // so resetting it does not clear the notifications center.
|
||||
// [UIApplication sharedApplication].applicationIconBadgeNumber = 1;
|
||||
// [UIApplication sharedApplication].applicationIconBadgeNumber = 0;
|
||||
//
|
||||
// [[UIApplication sharedApplication] cancelAllLocalNotifications];
|
||||
//}
|
||||
|
||||
#pragma mark - Matrix sessions handling
|
||||
|
||||
|
||||
Reference in New Issue
Block a user