From d8970f00728d0546c3b6225b9b96f3851e543ef8 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Wed, 4 Nov 2020 11:03:32 -0500 Subject: [PATCH] Review changes --- MVMCoreUI/TopAlert/MVMCoreUITopAlertView+Extension.swift | 2 +- MVMCoreUI/Utility/MVMCoreUIConstants.h | 3 +++ MVMCoreUI/Utility/MVMCoreUIConstants.m | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) 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";