mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 00:52:43 +02:00
@@ -418,9 +418,26 @@
|
||||
|
||||
- (void)userInterfaceThemeDidChange
|
||||
{
|
||||
// Consider the main navigation controller if the current view controller is embedded inside a split view controller.
|
||||
UINavigationController *mainNavigationController = self.navigationController;
|
||||
if (self.splitViewController.isCollapsed && self.splitViewController.viewControllers.count)
|
||||
{
|
||||
mainNavigationController = self.splitViewController.viewControllers.firstObject;
|
||||
}
|
||||
|
||||
[ThemeService.shared.theme applyStyleOnNavigationBar:self.navigationController.navigationBar];
|
||||
self.navigationController.navigationBar.translucent = YES;
|
||||
if (mainNavigationController)
|
||||
{
|
||||
[ThemeService.shared.theme applyStyleOnNavigationBar:mainNavigationController.navigationBar];
|
||||
}
|
||||
|
||||
// Keep navigation bar transparent in some cases
|
||||
if (!self.expandedHeaderContainer.hidden || !self.previewHeaderContainer.hidden)
|
||||
{
|
||||
self.navigationController.navigationBar.translucent = YES;
|
||||
mainNavigationController.navigationBar.translucent = YES;
|
||||
}
|
||||
|
||||
self.activityIndicator.backgroundColor = ThemeService.shared.theme.overlayBackgroundColor;
|
||||
|
||||
// Prepare jump to last unread banner
|
||||
@@ -1524,6 +1541,7 @@
|
||||
[mainNavigationController.navigationBar setShadowImage:shadowImage];
|
||||
[mainNavigationController.navigationBar setBackgroundImage:shadowImage forBarMetrics:UIBarMetricsDefault];
|
||||
mainNavigationController.navigationBar.translucent = isVisible;
|
||||
self.navigationController.navigationBar.translucent = isVisible;
|
||||
|
||||
[UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseIn
|
||||
animations:^{
|
||||
@@ -1615,6 +1633,7 @@
|
||||
mainNavigationController = self.splitViewController.viewControllers.firstObject;
|
||||
}
|
||||
mainNavigationController.navigationBar.translucent = isVisible;
|
||||
self.navigationController.navigationBar.translucent = isVisible;
|
||||
|
||||
// Finalize preview header display according to the screen orientation
|
||||
[self refreshPreviewHeader:UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])];
|
||||
|
||||
Reference in New Issue
Block a user