Fix UI code invoked from background thread

pull/239/head
nielsandriesse 5 years ago
parent 17bafffe53
commit 24a6b69ed8

@ -157,6 +157,7 @@ NSString *const ReportedApplicationStateDidChangeNotification = @"ReportedApplic
- (BOOL)isMainAppAndActive - (BOOL)isMainAppAndActive
{ {
if (![NSThread isMainThread]) { return NO; }
return [UIApplication sharedApplication].applicationState == UIApplicationStateActive; return [UIApplication sharedApplication].applicationState == UIApplicationStateActive;
} }

Loading…
Cancel
Save