mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Respond to CR.
This commit is contained in:
parent
9936003637
commit
81a40909f4
2 changed files with 12 additions and 3 deletions
|
@ -531,7 +531,7 @@ static NSTimeInterval launchStartedAt;
|
|||
// When opening the app from a notification,
|
||||
// AppDelegate.didReceiveLocalNotification will always
|
||||
// be called _before_ we become active.
|
||||
[SignalApp clearAllNotifications];
|
||||
[self clearAllNotificationsAndRestoreBadgeCount];
|
||||
|
||||
DDLogInfo(@"%@ applicationDidBecomeActive completed.", self.logTag);
|
||||
}
|
||||
|
@ -651,11 +651,21 @@ static NSTimeInterval launchStartedAt;
|
|||
DDLogWarn(@"%@ applicationWillResignActive.", self.logTag);
|
||||
|
||||
// Clear all notifications whenever we become inactive.
|
||||
[SignalApp clearAllNotifications];
|
||||
[self clearAllNotificationsAndRestoreBadgeCount];
|
||||
|
||||
[DDLog flushLog];
|
||||
}
|
||||
|
||||
- (void)clearAllNotificationsAndRestoreBadgeCount
|
||||
{
|
||||
OWSAssertIsOnMainThread();
|
||||
|
||||
[SignalApp clearAllNotifications];
|
||||
[AppReadiness runNowOrWhenAppIsReady:^{
|
||||
[OWSMessageUtils.sharedManager updateApplicationBadgeCount];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)application:(UIApplication *)application
|
||||
performActionForShortcutItem:(UIApplicationShortcutItem *)shortcutItem
|
||||
completionHandler:(void (^)(BOOL succeeded))completionHandler {
|
||||
|
|
|
@ -95,7 +95,6 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
[CurrentAppContext() setMainAppBadgeNumber:numberOfItems];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
|
Loading…
Reference in a new issue