cleanup ahead of PR

// FREEBIE
pull/1/head
Michael Kirk 6 years ago committed by Matthew Chen
parent 7ad5f15448
commit 778e11c2c3

@ -1100,9 +1100,6 @@ static NSTimeInterval launchStartedAt;
[OWSBackupLazyRestoreJob runAsync];
#endif
// MJK FIXME
OutboundCallInitiator *outboundCallInitiator = SignalApp.sharedApp.outboundCallInitiator;
[outboundCallInitiator initiateCallWithHandle:@"+14158181337"];
}
- (void)registrationStateDidChange

@ -23,32 +23,6 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)initWithRootViewController:(UIViewController *)rootViewController
{
// Attempt 1: negative additionalSafeArea
// Failure: additionalSafeArea insets cannot be negative
// UIEdgeInsets newSafeArea = UIEdgeInsetsMake(-50, 30, 20, 30);
// rootViewController.additionalSafeAreaInsets = newSafeArea;
// Attempt 2: safeAreaInsets on vc.view
// failure. they're already 0
// UIEdgeInsets existingInsets = rootViewController.view.safeAreaInsets;
// Attempt 3: override topLayoutGuide?
// Failure - not called.
// overriding it does no good - it's not called by default layout code.
// presumably it just existing if you want to use it as an anchor.
// Attemp 4: sizeForChildContentConainer?
// Failure - not called.
// Attempt 5: autoSetDimension on navbar
// Failure: no effect on rendered size
// Attempt 6: manually set child frames in will/didLayoutSubviews
// glitchy, and viewcontrollers re-layout themselves afterwards anyway
// Attempt 7: Since we can't seem to *shrink* the navbar, maybe we can grow it.
// make additionalSafeAreaInsets
self = [self initWithNavigationBarClass:[OWSNavigationBar class] toolbarClass:nil];
[self pushViewController:rootViewController animated:NO];

@ -11,17 +11,12 @@
NS_ASSUME_NONNULL_BEGIN
NSString *const OWSWindowManagerCallDidChangeNotification = @"OWSWindowManagerCallDidChangeNotification";
// NSString *const OWSWindowManagerWillShowReturnToCallWindowNotification =
// @"OWSWindowManagerWillShowReturnToCallWindowNotification"; NSString *const
// OWSWindowManagerWillHideReturnToCallWindowNotification = @"OWSWindowManagerWillHideReturnToCallWindowNotification";
const CGFloat OWSWindowManagerCallScreenHeight(void);
const CGFloat OWSWindowManagerCallScreenHeight(void)
{
if ([UIDevice currentDevice].isIPhoneX) {
// TODO - rather than a bigger banner, we should stick with iPhoneX
// design changes, which only apply a green circle around the clock UI.
return 60;
} else {
return 40;
@ -274,9 +269,6 @@ const UIWindowLevel UIWindowLevel_ScreenBlocking(void)
OWSAssert(self.callViewWindow);
OWSAssert(self.screenBlockingWindow);
// MJK remove
self.rootWindow.backgroundColor = UIColor.yellowColor;
// To avoid bad frames, we never want to hide the blocking window, so we manipulate
// its window level to "hide" it behind other windows. The other windows have fixed
// window level and are shown/hidden as necessary.
@ -299,21 +291,21 @@ const UIWindowLevel UIWindowLevel_ScreenBlocking(void)
} else if (self.callViewController) {
// Show Root Window + "Return to Call".
[self ensureRootWindowShownWithActiveCall:YES];
[self ensureRootWindowShown];
[self ensureReturnToCallWindowShown];
[self ensureCallViewWindowHidden];
[self ensureScreenBlockWindowHidden];
} else {
// Show Root Window
[self ensureRootWindowShownWithActiveCall:NO];
[self ensureRootWindowShown];
[self ensureReturnToCallWindowHidden];
[self ensureCallViewWindowHidden];
[self ensureScreenBlockWindowHidden];
}
}
- (void)ensureRootWindowShownWithActiveCall:(BOOL)isActiveCall
- (void)ensureRootWindowShown
{
OWSAssertIsOnMainThread();
@ -321,17 +313,6 @@ const UIWindowLevel UIWindowLevel_ScreenBlocking(void)
DDLogInfo(@"%@ showing root window.", self.logTag);
}
CGRect defaultFrame = [UIScreen mainScreen].bounds;
// if (isActiveCall) {
// CGRect frameWithActiveCall = CGRectMake(0,
// OWSWindowManagerCallScreenHeight(),
// defaultFrame.size.width,
// defaultFrame.size.height - OWSWindowManagerCallScreenHeight());
// self.rootWindow.frame = frameWithActiveCall;
// } else {
self.rootWindow.frame = defaultFrame;
// }
// By calling makeKeyAndVisible we ensure the rootViewController becomes firt responder.
// In the normal case, that means the SignalViewController will call `becomeFirstResponder`
// on the vc on top of its navigation stack.

Loading…
Cancel
Save