From e59adf7e470c300b0ddc5ba128bd8f0fe7aa2585 Mon Sep 17 00:00:00 2001 From: panxi Date: Wed, 17 Apr 2019 15:20:56 -0400 Subject: [PATCH] change order of code --- MVMCoreUI/TopAlert/MVMCoreUITopAlertView.m | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/MVMCoreUI/TopAlert/MVMCoreUITopAlertView.m b/MVMCoreUI/TopAlert/MVMCoreUITopAlertView.m index 02fb2ac6..b65f7423 100644 --- a/MVMCoreUI/TopAlert/MVMCoreUITopAlertView.m +++ b/MVMCoreUI/TopAlert/MVMCoreUITopAlertView.m @@ -245,11 +245,12 @@ NSString * const MFAccTopAlertClosed = @"Top alert notification is closed."; } - (void)resetDefaultBackgroundColor:(UIColor *)backgroundColor basedOnStatusBarStyle:(UIStatusBarStyle)style { - UIColor *defaultStatusBarBackgroundColor = backgroundColor; - if (!defaultStatusBarBackgroundColor) { - defaultStatusBarBackgroundColor = style == UIStatusBarStyleDefault ? [UIColor whiteColor] : [UIColor blackColor]; - } if (!self.topAlertObject) { + UIColor *defaultStatusBarBackgroundColor = backgroundColor; + if (!defaultStatusBarBackgroundColor) { + defaultStatusBarBackgroundColor = style == UIStatusBarStyleDefault ? [UIColor whiteColor] : [UIColor blackColor]; + } + //color doesn't match the current default value if (!CGColorEqualToColor(defaultStatusBarBackgroundColor.CGColor, self.statusBarView.backgroundColor.CGColor)) { self.statusBarView.backgroundColor = defaultStatusBarBackgroundColor;