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

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

@ -70,6 +70,21 @@ public class ShareViewController: UIViewController, ShareViewDelegate, SAEFailed
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()
self.shareViewNavigationController = shareViewNavigationController
@ -90,21 +105,6 @@ public class ShareViewController: UIViewController, ShareViewDelegate, SAEFailed
strongSelf.showPrimaryViewController(loadViewController)
}.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.
NotificationCenter.default.addObserver(self,

Loading…
Cancel
Save