diff --git a/Vector/AppDelegate.m b/Vector/AppDelegate.m index 0bb02c109..542513aeb 100644 --- a/Vector/AppDelegate.m +++ b/Vector/AppDelegate.m @@ -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