diff --git a/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.m b/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.m index 2aee69b..b9cea23 100644 --- a/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.m +++ b/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.m @@ -449,8 +449,10 @@ NSString * const KeyActionTypeOpen = @"openPage"; if (!error.silentError) { // Show alert - MVMCoreAlertObject *alertObject = [[MVMCoreAlertObject alloc] initPopupAlertWithError:error isGreedy:NO]; - [[MVMCoreAlertHandler sharedAlertHandler] showAlertWithAlertObject:alertObject]; + [MVMCoreDispatchUtility performBlockOnMainThread:^{ + MVMCoreAlertObject *alertObject = [[MVMCoreAlertObject alloc] initPopupAlertWithError:error isGreedy:NO]; + [[MVMCoreAlertHandler sharedAlertHandler] showAlertWithAlertObject:alertObject]; + }]; } } diff --git a/MVMCore/MVMCore/AlertHandling/MVMCoreTopAlertObject.m b/MVMCore/MVMCore/AlertHandling/MVMCoreTopAlertObject.m index 45819d4..72b6de4 100644 --- a/MVMCore/MVMCore/AlertHandling/MVMCoreTopAlertObject.m +++ b/MVMCore/MVMCore/AlertHandling/MVMCoreTopAlertObject.m @@ -50,11 +50,9 @@ NSUInteger const TopAlertDismissTime = 5; self.useNewStyle = [responseInfo boolForKey:@"newTopAlertStyle"]; // Server driven dismiss time. - if (self.useNewStyle) { - NSNumber *topAlertTime = [responseInfo optionalNumberForKey:@"topAlertTime"]; - if (topAlertTime != nil) { - self.topAlertDismissTime = [topAlertTime integerValue]; - } + NSNumber *topAlertTime = [responseInfo optionalNumberForKey:@"topAlertTime"]; + if (topAlertTime != nil) { + self.topAlertDismissTime = [topAlertTime integerValue]; } } return self; diff --git a/MVMCore/MVMCore/Utility/MVMCoreErrorObject.m b/MVMCore/MVMCore/Utility/MVMCoreErrorObject.m index 2f16308..d16a7a5 100644 --- a/MVMCore/MVMCore/Utility/MVMCoreErrorObject.m +++ b/MVMCore/MVMCore/Utility/MVMCoreErrorObject.m @@ -57,8 +57,9 @@ self.domain = domain; self.location = location; self.date = [NSDate date]; - self.applicationState = [UIApplication sharedApplication].applicationState; - + [MVMCoreDispatchUtility performSyncBlockOnMainThread:^{ + self.applicationState = [UIApplication sharedApplication].applicationState; + }]; // We don't log server errors. if (![domain isEqualToString:ErrorDomainServer]) { self.logError = YES;