Respond to CR.

pull/1/head
Matthew Chen 7 years ago
parent 81f234f6a0
commit 08a135a3f4

@ -150,9 +150,7 @@ NS_ASSUME_NONNULL_BEGIN
- (UIStatusBarStyle)preferredStatusBarStyle - (UIStatusBarStyle)preferredStatusBarStyle
{ {
if (!CurrentAppContext().isMainApp) { if (OWSWindowManager.sharedManager.hasCall) {
return super.preferredStatusBarStyle;
} else if (OWSWindowManager.sharedManager.hasCall) {
// Status bar is overlaying the green "call banner" // Status bar is overlaying the green "call banner"
return UIStatusBarStyleLightContent; return UIStatusBarStyleLightContent;
} else { } else {
@ -172,9 +170,7 @@ NS_ASSUME_NONNULL_BEGIN
[UIView setAnimationsEnabled:NO]; [UIView setAnimationsEnabled:NO];
if (@available(iOS 11.0, *)) { if (@available(iOS 11.0, *)) {
if (!CurrentAppContext().isMainApp) { if (OWSWindowManager.sharedManager.hasCall) {
self.additionalSafeAreaInsets = UIEdgeInsetsZero;
} else if (OWSWindowManager.sharedManager.hasCall) {
self.additionalSafeAreaInsets = UIEdgeInsetsMake(20, 0, 0, 0); self.additionalSafeAreaInsets = UIEdgeInsetsMake(20, 0, 0, 0);
} else { } else {
self.additionalSafeAreaInsets = UIEdgeInsetsZero; self.additionalSafeAreaInsets = UIEdgeInsetsZero;

@ -157,12 +157,10 @@ public class OWSNavigationBar: UINavigationBar {
} }
public override func layoutSubviews() { public override func layoutSubviews() {
if CurrentAppContext().isMainApp {
guard OWSWindowManager.shared().hasCall() else { guard OWSWindowManager.shared().hasCall() else {
super.layoutSubviews() super.layoutSubviews()
return return
} }
}
guard #available(iOS 11, *) else { guard #available(iOS 11, *) else {
super.layoutSubviews() super.layoutSubviews()

@ -70,6 +70,21 @@ public class ShareViewController: UIViewController, ShareViewDelegate, SAEFailed
return return
} }
// We shouldn't set up our environment until after we've consulted isReadyForAppExtensions.
AppSetup.setupEnvironment(appSpecificSingletonBlock: {
SSKEnvironment.shared.callMessageHandler = NoopCallMessageHandler()
SSKEnvironment.shared.notificationsManager = NoopNotificationsManager()
},
migrationCompletion: { [weak self] in
AssertIsOnMainThread()
guard let strongSelf = self else { return }
// performUpdateCheck must be invoked after Environment has been initialized because
// upgrade process may depend on Environment.
strongSelf.versionMigrationsDidComplete()
})
let shareViewNavigationController = OWSNavigationController() let shareViewNavigationController = OWSNavigationController()
self.shareViewNavigationController = shareViewNavigationController self.shareViewNavigationController = shareViewNavigationController
@ -90,21 +105,6 @@ public class ShareViewController: UIViewController, ShareViewDelegate, SAEFailed
strongSelf.showPrimaryViewController(loadViewController) strongSelf.showPrimaryViewController(loadViewController)
}.retainUntilComplete() }.retainUntilComplete()
// We shouldn't set up our environment until after we've consulted isReadyForAppExtensions.
AppSetup.setupEnvironment(appSpecificSingletonBlock: {
SSKEnvironment.shared.callMessageHandler = NoopCallMessageHandler()
SSKEnvironment.shared.notificationsManager = NoopNotificationsManager()
},
migrationCompletion: { [weak self] in
AssertIsOnMainThread()
guard let strongSelf = self else { return }
// performUpdateCheck must be invoked after Environment has been initialized because
// upgrade process may depend on Environment.
strongSelf.versionMigrationsDidComplete()
})
// We don't need to use "screen protection" in the SAE. // We don't need to use "screen protection" in the SAE.
NotificationCenter.default.addObserver(self, NotificationCenter.default.addObserver(self,

Loading…
Cancel
Save