This commit is contained in:
Kevin G Christiano 2020-07-20 12:09:12 -04:00
parent 85f37ddfe0
commit bc9c28aa3f
2 changed files with 10 additions and 11 deletions

View File

@ -321,12 +321,6 @@ NSString * const KeyActionTypeOpen = @"openPage";
[delegateObject.actionDelegate willShowPopupWithAlertObject:alertObject alertJson:actionInformation];
}
NSDictionary *alertDictionary = [actionInformation dict:@"alert"];
NSNumber *style = [alertDictionary optionalNumberForKey:@"style"];
if ([style isEqual:@0]) {
alertObject.alertStyle = UIAlertControllerStyleActionSheet;
}
if (alertObject) {
[[MVMCoreAlertHandler sharedAlertHandler] showAlertWithAlertObject:alertObject];
} else {

View File

@ -30,10 +30,15 @@ public extension MVMCoreAlertObject {
}
actionsForAlert.append(alertAction)
}
return MVMCoreAlertObject(popupAlertWithTitle: alertJson.optionalStringForKey(KeyTitle),
message: alertJson.optionalStringForKey(KeyMessage),
actions: actionsForAlert,
isGreedy: false)
let alertObject = MVMCoreAlertObject(popupAlertWithTitle: alertJson.optionalStringForKey(KeyTitle),
message: alertJson.optionalStringForKey(KeyMessage),
actions: actionsForAlert,
isGreedy: false)
let alertStyle = alertJson.int32ForKey("style")
alertObject?.alertStyle = alertStyle == 0 ? .actionSheet : .alert
return alertObject
}
}