Merge branch 'feature/SuspensionAlert' into 'develop'

Display Alert in Line Suspension

See merge request BPHV_MIPS/mvm_core!124
This commit is contained in:
Pfeil, Scott Robert 2020-11-03 11:56:29 -05:00
commit 644e623427

View File

@ -780,11 +780,10 @@
return;
}
// If we have an alert to show and a loaded view controller, allow the loaded view controller to be the delegate.
DelegateObject *delegateObject = [loadedViewController respondsToSelector:@selector(delegateObject)] ? [loadedViewController delegateObject] : loadObject.operation.delegateObject;
// Show any alerts that we have been saving.
if (loadObject.operation.alertToShow) {
// If we have an alert to show and a loaded view controller, allow the loaded view controller to be the delegate.
DelegateObject *delegateObject = [loadedViewController respondsToSelector:@selector(delegateObject)] ? [loadedViewController delegateObject] : loadObject.operation.delegateObject;
[MVMCoreLoadRequestOperation createAndShowAlertForLoadObject:loadObject error:loadObject.operation.errorForAlertToShow delegateObject:delegateObject];
}
@ -797,6 +796,7 @@
//make post load calls function
[MVMCoreLoadRequestOperation loadPostCallActions:loadObject];
[MVMCoreLoadRequestOperation loadPostAction:loadObject delegateObject:delegateObject];
[loadObject.operation markAsFinished];
}
@ -819,6 +819,13 @@
}
}
+ (void)loadPostAction:(nonnull MVMCoreLoadObject *)loadObject delegateObject:(nullable DelegateObject *)delegateObject {
NSDictionary *actionDict = [loadObject.responseJSON dict:@"PostAction"];
if (actionDict) {
[[MVMCoreActionHandler sharedActionHandler] handleActionWithDictionary:actionDict additionalData:nil delegateObject:delegateObject];
}
}
+ (void)removeCaches:(nullable NSDictionary *)cacheDictionary {
if (cacheDictionary) {