mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-01 13:46:57 +02:00
Prepare Dark Theme
Remove the [UIApplication statusBarHidden] use (deprecated since iOS 9). Use the default UIViewController-based status bar system. Hide the user interface theme option in Settings. https://github.com/vector-im/riot-meta/issues/22
This commit is contained in:
@@ -79,6 +79,11 @@
|
||||
Observe kRiotDesignValuesDidChangeThemeNotification to handle user interface theme change.
|
||||
*/
|
||||
id kRiotDesignValuesDidChangeThemeNotificationObserver;
|
||||
|
||||
/**
|
||||
The current visibility of the status bar in this view controller.
|
||||
*/
|
||||
BOOL isStatusBarHidden;
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -107,6 +112,9 @@
|
||||
// Setup `MXKViewControllerHandling` properties
|
||||
self.enableBarTintColorStatusChange = NO;
|
||||
self.rageShakeManager = [RageShakeManager sharedManager];
|
||||
|
||||
// Keep visible the status bar by default.
|
||||
isStatusBarHidden = NO;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad
|
||||
@@ -221,6 +229,12 @@
|
||||
self.defaultBarTintColor = kRiotSecondaryBgColor;
|
||||
}
|
||||
|
||||
- (BOOL)prefersStatusBarHidden
|
||||
{
|
||||
// Return the current status bar visibility.
|
||||
return isStatusBarHidden;
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated
|
||||
{
|
||||
[super viewWillAppear:animated];
|
||||
@@ -1096,6 +1110,10 @@
|
||||
[avatarFullScreenView removeFromSuperview];
|
||||
|
||||
avatarFullScreenView = nil;
|
||||
|
||||
isStatusBarHidden = NO;
|
||||
// Trigger status bar update
|
||||
[self setNeedsStatusBarAppearanceUpdate];
|
||||
}];
|
||||
|
||||
NSString *avatarURL = nil;
|
||||
@@ -1113,6 +1131,10 @@
|
||||
previewImage:contactAvatar.image];
|
||||
|
||||
[avatarFullScreenView showFullScreen];
|
||||
isStatusBarHidden = YES;
|
||||
|
||||
// Trigger status bar update
|
||||
[self setNeedsStatusBarAppearanceUpdate];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user