diff --git a/MVMCoreUI/TopAlert/MVMCoreUITopAlertView+Extension.swift b/MVMCoreUI/TopAlert/MVMCoreUITopAlertView+Extension.swift index a0b128b2..f179fb11 100644 --- a/MVMCoreUI/TopAlert/MVMCoreUITopAlertView+Extension.swift +++ b/MVMCoreUI/TopAlert/MVMCoreUITopAlertView+Extension.swift @@ -36,7 +36,7 @@ public extension MVMCoreUITopAlertView { // Show any new top alert. guard let responseJSON = loadObject.responseJSON, - let json = responseJSON.optionalDictionaryForKey("TopNotification"), + let json = responseJSON.optionalDictionaryForKey(KeyTopAlert), let model = decodeTopNotification(with: json, delegateObject: getDelegateObject()) else { return } showTopAlert(with: model) } diff --git a/MVMCoreUI/Utility/MVMCoreUIConstants.h b/MVMCoreUI/Utility/MVMCoreUIConstants.h index ddd93d44..b96d50ed 100644 --- a/MVMCoreUI/Utility/MVMCoreUIConstants.h +++ b/MVMCoreUI/Utility/MVMCoreUIConstants.h @@ -49,6 +49,9 @@ extern NSString * const KeyActionTypeAlert; extern NSString * const KeyActionTypeTopAlert; extern NSString * const KeyActionTypeCollapseNotification; +/// Key for molecular top notification architecture. +extern NSString * const KeyTopAlert; + #pragma mark - Values extern NSString * const StringY; diff --git a/MVMCoreUI/Utility/MVMCoreUIConstants.m b/MVMCoreUI/Utility/MVMCoreUIConstants.m index a2b352fb..092851cd 100644 --- a/MVMCoreUI/Utility/MVMCoreUIConstants.m +++ b/MVMCoreUI/Utility/MVMCoreUIConstants.m @@ -47,6 +47,8 @@ NSString * const KeyActionTypeAlert = @"alert"; NSString * const KeyActionTypeTopAlert = @"topAlert"; NSString * const KeyActionTypeCollapseNotification = @"collapseNotification"; +NSString * const KeyTopAlert = @"TopNotification"; + #pragma mark - Values NSString * const StringY = @"Y";