mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
move fix to OWSViewController
This commit is contained in:
parent
90e3cb0ed4
commit
06b4584e02
2 changed files with 37 additions and 1 deletions
|
@ -156,7 +156,6 @@ class CallViewController: OWSViewController, CallObserver, CallServiceObserver,
|
|||
|
||||
@objc func didBecomeActive() {
|
||||
if (self.isViewLoaded) {
|
||||
self.setNeedsStatusBarAppearanceUpdate()
|
||||
shouldRemoteVideoControlsBeHidden = false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,6 +26,30 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
|
||||
- (instancetype)initWithNibName:(nullable NSString *)nibNameOrNil bundle:(nullable NSBundle *)nibBundleOrNil
|
||||
{
|
||||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
|
||||
if (!self) {
|
||||
return self;
|
||||
}
|
||||
|
||||
[self observeActivation];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder
|
||||
{
|
||||
self = [super initWithCoder:aDecoder];
|
||||
if (!self) {
|
||||
return self;
|
||||
}
|
||||
|
||||
[self observeActivation];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)autoPinViewToBottomOfViewControllerOrKeyboard:(UIView *)view
|
||||
{
|
||||
OWSAssert(view);
|
||||
|
@ -60,6 +84,19 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
self.bottomLayoutConstraint = [view autoPinEdge:ALEdgeBottom toEdge:ALEdgeBottom ofView:self.view];
|
||||
}
|
||||
|
||||
- (void)observeActivation
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(owsViewControllerApplicationDidBecomeActive:)
|
||||
name:UIApplicationDidBecomeActiveNotification
|
||||
object:nil];
|
||||
}
|
||||
|
||||
- (void)owsViewControllerApplicationDidBecomeActive:(NSNotification *)notification
|
||||
{
|
||||
[self setNeedsStatusBarAppearanceUpdate];
|
||||
}
|
||||
|
||||
- (void)keyboardWillShow:(NSNotification *)notification
|
||||
{
|
||||
[self handleKeyboardNotification:notification];
|
||||
|
|
Loading…
Reference in a new issue