Merge branch 'develop' into feature/tabbar_animation
This commit is contained in:
commit
38601c6166
@ -33,6 +33,7 @@ typedef void (^TextFieldErrorHandler)(NSArray * _Nonnull fieldErrors);
|
|||||||
@property (nonatomic) BOOL isGreedy;
|
@property (nonatomic) BOOL isGreedy;
|
||||||
@property (nonatomic) UIAlertControllerStyle alertStyle;
|
@property (nonatomic) UIAlertControllerStyle alertStyle;
|
||||||
@property (nonatomic) MFAlertType type;
|
@property (nonatomic) MFAlertType type;
|
||||||
|
@property (nonatomic) BOOL defaultAction;
|
||||||
|
|
||||||
@property (nonnull, strong, nonatomic) NSArray *fieldErrors;
|
@property (nonnull, strong, nonatomic) NSArray *fieldErrors;
|
||||||
@property (nullable, nonatomic, copy) TextFieldErrorHandler textFieldErrorHandler;
|
@property (nullable, nonatomic, copy) TextFieldErrorHandler textFieldErrorHandler;
|
||||||
|
|||||||
@ -39,6 +39,7 @@
|
|||||||
|
|
||||||
// only if actions are empty, then go inside and set OK as default action
|
// only if actions are empty, then go inside and set OK as default action
|
||||||
if (alert.type == MFAlertTypePopup && alert.actions.count == 0) {
|
if (alert.type == MFAlertTypePopup && alert.actions.count == 0) {
|
||||||
|
alert.defaultAction = YES;
|
||||||
alert.actions = @[[UIAlertAction actionWithTitle:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedOK] style:UIAlertActionStyleDefault handler:nil]];
|
alert.actions = @[[UIAlertAction actionWithTitle:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedOK] style:UIAlertActionStyleDefault handler:nil]];
|
||||||
}
|
}
|
||||||
return alert;
|
return alert;
|
||||||
@ -119,6 +120,7 @@
|
|||||||
self.title = error.title;
|
self.title = error.title;
|
||||||
self.message = [NSString stringWithFormat:@"%@ (%@)",error.messageToDisplay,[error stringErrorCode]];
|
self.message = [NSString stringWithFormat:@"%@ (%@)",error.messageToDisplay,[error stringErrorCode]];
|
||||||
self.actions = @[[UIAlertAction actionWithTitle:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedOK] style:UIAlertActionStyleDefault handler:nil]];
|
self.actions = @[[UIAlertAction actionWithTitle:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedOK] style:UIAlertActionStyleDefault handler:nil]];
|
||||||
|
self.defaultAction = YES;
|
||||||
self.isGreedy = isGreedy;
|
self.isGreedy = isGreedy;
|
||||||
self.type = MFAlertTypePopup;
|
self.type = MFAlertTypePopup;
|
||||||
self.alertStyle = UIAlertControllerStyleAlert;
|
self.alertStyle = UIAlertControllerStyleAlert;
|
||||||
|
|||||||
@ -38,5 +38,6 @@ typedef NS_ENUM(NSInteger, ErrorCode) {
|
|||||||
ErrorCodeInvalidSettingType,
|
ErrorCodeInvalidSettingType,
|
||||||
ErrorCodeServerFailSendFaceIDHash,
|
ErrorCodeServerFailSendFaceIDHash,
|
||||||
ErrorCodeSSL,
|
ErrorCodeSSL,
|
||||||
ErrorCodeNoViewControllerToPresentOn
|
ErrorCodeNoViewControllerToPresentOn,
|
||||||
|
ErrorCodeNoErrorPageSent
|
||||||
};
|
};
|
||||||
|
|||||||
@ -480,10 +480,20 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if we should load a screen.
|
||||||
if (loadObject.operation.backgroundLoad || (!error.errorScreenError && loadObject.requestParameters.noViewControllerToLoad) || (!error.nativeDrivenErrorScreen && loadObject.pageType.length == 0)) {
|
if (loadObject.operation.backgroundLoad || (!error.errorScreenError && loadObject.requestParameters.noViewControllerToLoad) || (!error.nativeDrivenErrorScreen && loadObject.pageType.length == 0)) {
|
||||||
|
|
||||||
// No screen to load, finish the load.
|
// If the server told us there is an error screen but did not provide the page, show a critical error and log so we can have them fix it.
|
||||||
[MVMCoreLoadRequestOperation loadFinished:loadObject loadedViewController:nil errorObject:error];
|
if (error.errorScreenError && !error.nativeDrivenErrorScreen && loadObject.pageType.length == 0) {
|
||||||
|
error.logError = YES;
|
||||||
|
error.errorScreenError = NO;
|
||||||
|
error.location = [NSString stringWithFormat:@"%li-%@",(long)ErrorCodeNoErrorPageSent,error.location];
|
||||||
|
[MVMCoreLoadRequestOperation handleError:error loadObject:loadObject showAlertForErrorIfApplicable:YES];
|
||||||
|
[MVMCoreLoadRequestOperation loadFinished:loadObject loadedViewController:nil errorObject:error];
|
||||||
|
} else {
|
||||||
|
// No screen to load, finish the load.
|
||||||
|
[MVMCoreLoadRequestOperation loadFinished:loadObject loadedViewController:nil errorObject:error];
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// We have a screen to show.
|
// We have a screen to show.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user