review comments updated
This commit is contained in:
parent
87e02c37b7
commit
8a84d42c95
@ -12,7 +12,7 @@ import UIKit
|
|||||||
|
|
||||||
public static var identifier: String = "topNotification"
|
public static var identifier: String = "topNotification"
|
||||||
public var actionType: String = ActionTopNotificationModel.identifier
|
public var actionType: String = ActionTopNotificationModel.identifier
|
||||||
public var topNotification: TopNotificationModel?
|
public var topNotification: TopNotificationModel
|
||||||
public var extraParameters: JSONValueDictionary?
|
public var extraParameters: JSONValueDictionary?
|
||||||
public var analyticsData: JSONValueDictionary?
|
public var analyticsData: JSONValueDictionary?
|
||||||
|
|
||||||
|
|||||||
@ -35,6 +35,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
// Shows a top alert
|
// Shows a top alert
|
||||||
- (void)topAlertAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
- (void)topAlertAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||||
|
|
||||||
|
// Shows a molecular top alert
|
||||||
|
- (void)topNotificationAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||||
|
|
||||||
// Collapses the current top notification
|
// Collapses the current top notification
|
||||||
- (void)collapseNotificationAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
- (void)collapseNotificationAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||||
|
|
||||||
|
|||||||
@ -98,13 +98,8 @@
|
|||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
} else {
|
} else {
|
||||||
NSDictionary *topNotification = [actionInformation dict:@"topNotification"];
|
MVMCoreErrorObject *error = [[MVMCoreErrorObject alloc] initWithTitle:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorTitle] message:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorUnableToProcess] code:ErrorCodeParsingJSON domain:ErrorDomainNative location:[NSString stringWithFormat:@"%@_%@",NSStringFromClass([delegateObject.actionDelegate class]),KeyActionTypeTopAlert]];
|
||||||
if (topNotification) {
|
[self handleActionError:error actionInformation:actionInformation additionalData:additionalData delegateObject:delegateObject];
|
||||||
[[MVMCoreUITopAlertView sharedGlobal] showTopAlertWith:topNotification];
|
|
||||||
} else {
|
|
||||||
MVMCoreErrorObject *error = [[MVMCoreErrorObject alloc] initWithTitle:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorTitle] message:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorUnableToProcess] code:ErrorCodeParsingJSON domain:ErrorDomainNative location:[NSString stringWithFormat:@"%@_%@",NSStringFromClass([delegateObject.actionDelegate class]),KeyActionTypeTopAlert]];
|
|
||||||
[self handleActionError:error actionInformation:actionInformation additionalData:additionalData delegateObject:delegateObject];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,9 +112,8 @@
|
|||||||
|
|
||||||
- (void)topNotificationAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject {
|
- (void)topNotificationAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject {
|
||||||
//Handle molecular topnotification
|
//Handle molecular topnotification
|
||||||
NSDictionary *topNotification = [actionInformation dict:@"topNotification"];
|
if (actionInformation) {
|
||||||
if (topNotification) {
|
[[MVMCoreUITopAlertView sharedGlobal] showTopAlertWith:[actionInformation dictionaryForKey:@"topNotification"]];
|
||||||
[[MVMCoreUITopAlertView sharedGlobal] showTopAlertWith:topNotification];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,6 +141,9 @@
|
|||||||
} else if ([actionType isEqualToString:KeyActionTypeCollapseNotification]) {
|
} else if ([actionType isEqualToString:KeyActionTypeCollapseNotification]) {
|
||||||
[self collapseNotificationAction:actionInformation additionalData:additionalData delegate:delegate];
|
[self collapseNotificationAction:actionInformation additionalData:additionalData delegate:delegate];
|
||||||
return YES;
|
return YES;
|
||||||
|
} else if ([actionType isEqualToString:KeyActionTypeTopNotification]) {
|
||||||
|
[self topNotificationAction:actionInformation additionalData:additionalData delegate:delegate];
|
||||||
|
return YES;
|
||||||
}
|
}
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
@ -186,13 +183,8 @@
|
|||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
} else {
|
} else {
|
||||||
NSDictionary *topNotification = [actionInformation dict:@"topNotification"];
|
MVMCoreErrorObject *error = [[MVMCoreErrorObject alloc] initWithTitle:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorTitle] message:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorUnableToProcess] code:ErrorCodeParsingJSON domain:ErrorDomainNative location:[NSString stringWithFormat:@"%@_%@",NSStringFromClass([delegate class]),KeyActionTypeTopAlert]];
|
||||||
if (topNotification) {
|
[self handleActionError:error actionInformation:actionInformation additionalData:additionalData delegate:delegate];
|
||||||
[[MVMCoreUITopAlertView sharedGlobal] showTopAlertWith:topNotification];
|
|
||||||
} else {
|
|
||||||
MVMCoreErrorObject *error = [[MVMCoreErrorObject alloc] initWithTitle:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorTitle] message:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorUnableToProcess] code:ErrorCodeParsingJSON domain:ErrorDomainNative location:[NSString stringWithFormat:@"%@_%@",NSStringFromClass([delegate class]),KeyActionTypeTopAlert]];
|
|
||||||
[self handleActionError:error actionInformation:actionInformation additionalData:additionalData delegate:delegate];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,4 +195,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)topNotificationAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate {
|
||||||
|
//Handle molecular topnotification
|
||||||
|
if (actionInformation) {
|
||||||
|
[[MVMCoreUITopAlertView sharedGlobal] showTopAlertWith:[actionInformation dictionaryForKey:@"topNotification"]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user