diff --git a/MVMCore/MVMCore/AlertHandling/MVMCoreTopAlertOperation.m b/MVMCore/MVMCore/AlertHandling/MVMCoreTopAlertOperation.m index 50f296c..ccf7545 100644 --- a/MVMCore/MVMCore/AlertHandling/MVMCoreTopAlertOperation.m +++ b/MVMCore/MVMCore/AlertHandling/MVMCoreTopAlertOperation.m @@ -121,11 +121,11 @@ if (self.isCancelled) { // Cancelled, dismiss immediately. - [self dismissAlertView:YES]; + [self dismissAlertView:YES forceful:YES]; } else if (self.isPaused) { // Paused, dismiss for the time being if persistent. - [self dismissAlertView:!self.topAlertObject.persistent]; + [self dismissAlertView:!self.topAlertObject.persistent forceful:YES]; } else if (!self.topAlertObject.persistent) { // Set timer to dismiss top alert if it's not persistent (or it's survival mode and not short bar). @@ -141,7 +141,7 @@ if (weakSelf.isFinished || [weakSelf checkAndHandleForCancellation]) { return; } - [weakSelf dismissAlertView:YES]; + [weakSelf dismissAlertView:YES forceful:NO]; }); } }]; @@ -159,19 +159,19 @@ if (!self.isAnimating) { if (self.isDisplayed) { - [self dismissAlertView:YES]; + [self dismissAlertView:YES forceful:YES]; } else if (self.isExecuting) { [self markAsFinished]; } } } -- (void)dismissAlertView:(BOOL)andFinish { +- (void)dismissAlertView:(BOOL)andFinish forceful:(BOOL)forceful { if (self.isDisplayed && !self.isAnimating) { // Dismisses. - [[[MVMCoreObject sharedInstance].globalTopAlertDelegate getTopAlertView] hideAlertView:^(BOOL finished) { + [[[MVMCoreObject sharedInstance].globalTopAlertDelegate getTopAlertView] hideAlertView:forceful completionHandler:^(BOOL finished) { self.displayed = NO; if (andFinish) { @@ -188,7 +188,7 @@ self.paused = YES; [self didChangeValueForKey:@"isPaused"]; } - [self dismissAlertView:!self.topAlertObject.persistent]; + [self dismissAlertView:!self.topAlertObject.persistent forceful:YES]; } - (void)unpause { @@ -214,7 +214,7 @@ } - (void)topAlertCloseButtonPressed { - [self dismissAlertView:YES]; + [self dismissAlertView:YES forceful:YES]; } @end diff --git a/MVMCore/MVMCore/AlertHandling/MVMCoreTopAlertViewProtocol.h b/MVMCore/MVMCore/AlertHandling/MVMCoreTopAlertViewProtocol.h index 6f21c40..f667037 100644 --- a/MVMCore/MVMCore/AlertHandling/MVMCoreTopAlertViewProtocol.h +++ b/MVMCore/MVMCore/AlertHandling/MVMCoreTopAlertViewProtocol.h @@ -17,7 +17,7 @@ - (void)showWithTopAlertObject:(nullable MVMCoreTopAlertObject *)topAlertObject animationDelegate:(nonnull id )animationDelegate completionHandler:(void (^ __nullable)(BOOL finished))completionHandler; // Hides -- (void)hideAlertView:(void (^ __nullable)(BOOL finished))completionHandler; +- (void)hideAlertView:(BOOL)forceful completionHandler:(void (^ __nullable)(BOOL finished))completionHandler; // Collapses the notification if it has a short top message. Otherwise removes notification. - (void)collapseNotification;