From 2ac196ec86a1e7e46904b543df285090faa7e06e Mon Sep 17 00:00:00 2001 From: gmbnt Date: Tue, 17 Mar 2020 15:12:08 +1100 Subject: [PATCH] Fix status bar bug --- Signal/Signal-Info.plist | 6 +----- SignalMessaging/Loki/Redesign/Style Guide/AppMode.swift | 6 ++++++ SignalMessaging/ViewControllers/OWSNavigationController.m | 7 +------ 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Signal/Signal-Info.plist b/Signal/Signal-Info.plist index e56422d20..2f27ca17c 100644 --- a/Signal/Signal-Info.plist +++ b/Signal/Signal-Info.plist @@ -5,15 +5,11 @@ BuildDetails CarthageVersion - 0.33.0 - DateTime - Fri Mar 6 00:51:56 UTC 2020 + 0.34.0 OSXVersion 10.15.3 WebRTCCommit 1445d719bf05280270e9f77576f80f973fd847f8 M73 - XCodeVersion - 1100.1130 CFBundleDevelopmentRegion en diff --git a/SignalMessaging/Loki/Redesign/Style Guide/AppMode.swift b/SignalMessaging/Loki/Redesign/Style Guide/AppMode.swift index 318c863d3..e0b809a19 100644 --- a/SignalMessaging/Loki/Redesign/Style Guide/AppMode.swift +++ b/SignalMessaging/Loki/Redesign/Style Guide/AppMode.swift @@ -12,3 +12,9 @@ public var isLightMode: Bool { public var isDarkMode: Bool { return AppMode.current == .dark } + +@objc public final class LKAppModeUtilities : NSObject { + + @objc public static func isLightMode() -> Bool { return AppMode.current == .light } + @objc public static func isDarkMode() -> Bool { return AppMode.current == .dark } +} diff --git a/SignalMessaging/ViewControllers/OWSNavigationController.m b/SignalMessaging/ViewControllers/OWSNavigationController.m index f89869278..fe116ed4b 100644 --- a/SignalMessaging/ViewControllers/OWSNavigationController.m +++ b/SignalMessaging/ViewControllers/OWSNavigationController.m @@ -164,12 +164,7 @@ NS_ASSUME_NONNULL_BEGIN // Status bar is overlaying the green "call banner" return UIStatusBarStyleLightContent; } else { - UIViewController *presentedViewController = self.presentedViewController; - if (presentedViewController) { - return presentedViewController.preferredStatusBarStyle; - } else { - return (Theme.isDarkThemeEnabled ? UIStatusBarStyleLightContent : super.preferredStatusBarStyle); - } + return LKAppModeUtilities.isLightMode ? UIStatusBarStyleDefault : UIStatusBarStyleLightContent; } }