mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-30 13:16:58 +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:
@@ -83,6 +83,11 @@ static void *RecordingContext = &RecordingContext;
|
||||
Observe kRiotDesignValuesDidChangeThemeNotification to handle user interface theme change.
|
||||
*/
|
||||
id kRiotDesignValuesDidChangeThemeNotificationObserver;
|
||||
|
||||
/**
|
||||
The current visibility of the status bar in this view controller.
|
||||
*/
|
||||
BOOL isStatusBarHidden;
|
||||
}
|
||||
|
||||
@property (nonatomic) UIBackgroundTaskIdentifier backgroundRecordingID;
|
||||
@@ -117,6 +122,9 @@ static void *RecordingContext = &RecordingContext;
|
||||
|
||||
cameraQueue = dispatch_queue_create("media.picker.vc.camera", NULL);
|
||||
canToggleCamera = YES;
|
||||
|
||||
// Keep visible the status bar by default.
|
||||
isStatusBarHidden = NO;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad
|
||||
@@ -173,6 +181,12 @@ static void *RecordingContext = &RecordingContext;
|
||||
self.defaultBarTintColor = kRiotSecondaryBgColor;
|
||||
}
|
||||
|
||||
- (BOOL)prefersStatusBarHidden
|
||||
{
|
||||
// Return the current status bar visibility.
|
||||
return isStatusBarHidden;
|
||||
}
|
||||
|
||||
- (void)viewDidLayoutSubviews
|
||||
{
|
||||
[super viewDidLayoutSubviews];
|
||||
@@ -759,6 +773,11 @@ static void *RecordingContext = &RecordingContext;
|
||||
|
||||
validationView.image = selectedImage;
|
||||
[validationView showFullScreen];
|
||||
|
||||
// Hide the status bar
|
||||
isStatusBarHidden = YES;
|
||||
// Trigger status bar update
|
||||
[self setNeedsStatusBarAppearanceUpdate];
|
||||
}
|
||||
|
||||
- (void)validateSelectedVideo:(NSURL*)selectedVideoURL responseHandler:(void (^)(BOOL isValidated))handler
|
||||
@@ -805,6 +824,11 @@ static void *RecordingContext = &RecordingContext;
|
||||
}
|
||||
|
||||
[validationView showFullScreen];
|
||||
|
||||
// Hide the status bar
|
||||
isStatusBarHidden = YES;
|
||||
// Trigger status bar update
|
||||
[self setNeedsStatusBarAppearanceUpdate];
|
||||
}
|
||||
|
||||
- (void)dismissImageValidationView
|
||||
@@ -825,6 +849,10 @@ static void *RecordingContext = &RecordingContext;
|
||||
[validationView dismissSelection];
|
||||
[validationView removeFromSuperview];
|
||||
validationView = nil;
|
||||
|
||||
// Restore the status bar
|
||||
isStatusBarHidden = NO;
|
||||
[self setNeedsStatusBarAppearanceUpdate];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user