Top alert queue fix
This commit is contained in:
parent
060b6b3303
commit
50fb716f99
@ -16,6 +16,7 @@
|
||||
#import "MVMCoreRequestParameters.h"
|
||||
#import "MVMCoreErrorConstants.h"
|
||||
#import "MVMCoreLoggingHandler.h"
|
||||
#import "MVMCoreLoadingOverlayHandler.h"
|
||||
|
||||
@interface MVMCoreNavigationHandler ()
|
||||
|
||||
@ -90,6 +91,10 @@
|
||||
|
||||
- (void)startNavigationWithNavigationObject:(MVMCoreNavigationObject *)navigationObject delegate:(nullable NSObject<MVMCorePresentationDelegateProtocol>*)delegate completionHandler:(nullable void (^)(void))completionBlock {
|
||||
|
||||
// In case it takes some time to happen.
|
||||
[[MVMCoreLoadingOverlayHandler sharedLoadingOverlay] startLoading];
|
||||
navigationObject.stopLoadingOverlay = YES;
|
||||
|
||||
MVMCoreNavigationOperation *navigationOperation = [[MVMCoreNavigationOperation alloc] initWithNavigationObject:navigationObject];
|
||||
navigationOperation.delegate = delegate;
|
||||
navigationOperation.completionBlock = completionBlock;
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
@property (nonatomic) NavigationType navigationType;
|
||||
@property (nonatomic) BOOL animated;
|
||||
@property (nonatomic) BOOL tryToReplaceFirst;
|
||||
@property (nonatomic) BOOL stopLoadingOverlay;
|
||||
|
||||
- (nullable instancetype)initWithViewController:(nullable UIViewController *)viewController navigationController:(nullable UINavigationController *)navigationController viewControllers:(nullable NSArray *)viewControllers animated:(BOOL)animated tryToReplaceFirst:(BOOL)tryToReplaceFirst navigationType:(NavigationType)navigationType;
|
||||
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
#import "MVMCoreViewManagerProtocol.h"
|
||||
#import "MVMCoreViewControllerProtocol.h"
|
||||
#import "MVMCoreLoggingHandler.h"
|
||||
#import "MVMCoreLoadingOverlayHandler.h"
|
||||
|
||||
@interface MVMCoreNavigationOperation ()
|
||||
|
||||
@ -209,7 +210,10 @@
|
||||
}
|
||||
|
||||
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
|
||||
|
||||
if (self.navigationObject.stopLoadingOverlay) {
|
||||
[[MVMCoreLoadingOverlayHandler sharedLoadingOverlay] stopLoading:YES];
|
||||
}
|
||||
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(navigationController:willDisplayViewController:)]) {
|
||||
[self.delegate navigationController:navigationController willDisplayViewController:viewController];
|
||||
}
|
||||
|
||||
@ -22,7 +22,6 @@
|
||||
return operation;
|
||||
}
|
||||
|
||||
|
||||
- (void)main {
|
||||
|
||||
// Always check for cancellation before launching the task.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user