|
|
|
@ -11,6 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
@interface ShareAppExtensionContext ()
|
|
|
|
|
|
|
|
|
|
@property (nonatomic) UIViewController *rootViewController;
|
|
|
|
|
@property (atomic) BOOL isSAEInBackground;
|
|
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
@ -63,6 +64,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
DDLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
|
|
|
|
|
|
|
|
|
|
self.isSAEInBackground = NO;
|
|
|
|
|
|
|
|
|
|
[NSNotificationCenter.defaultCenter postNotificationName:OWSApplicationDidBecomeActiveNotification object:nil];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -83,6 +86,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
DDLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
|
|
|
|
|
[DDLog flushLog];
|
|
|
|
|
|
|
|
|
|
self.isSAEInBackground = YES;
|
|
|
|
|
|
|
|
|
|
[NSNotificationCenter.defaultCenter postNotificationName:OWSApplicationDidEnterBackgroundNotification object:nil];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -92,6 +97,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
DDLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
|
|
|
|
|
|
|
|
|
|
self.isSAEInBackground = NO;
|
|
|
|
|
|
|
|
|
|
[NSNotificationCenter.defaultCenter postNotificationName:OWSApplicationWillEnterForegroundNotification object:nil];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -121,6 +128,11 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
DDLogInfo(@"Ignoring request to set status bar style since we're in an app extension");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (BOOL)isInBackground
|
|
|
|
|
{
|
|
|
|
|
return self.isSAEInBackground;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (UIApplicationState)mainApplicationState
|
|
|
|
|
{
|
|
|
|
|
OWSFail(@"%@ called %s.", self.logTag, __PRETTY_FUNCTION__);
|
|
|
|
|