Merge branch 'develop' into steve/4734_room_stack

This commit is contained in:
SBiOSoftWhare
2021-10-14 16:21:03 +02:00
41 changed files with 1235 additions and 36 deletions
@@ -41,10 +41,22 @@ class VectorHostingController: UIHostingController<AnyView> {
override func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = .clear
self.registerThemeServiceDidChangeThemeNotification()
self.update(theme: self.theme)
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
// Fixes weird iOS 15 bug where the view no longer grows its enclosing host
if #available(iOS 15.0, *) {
self.view.invalidateIntrinsicContentSize()
}
}
private func registerThemeServiceDidChangeThemeNotification() {
NotificationCenter.default.addObserver(self, selector: #selector(themeDidChange), name: .themeServiceDidChangeTheme, object: nil)
}
@@ -54,8 +66,6 @@ class VectorHostingController: UIHostingController<AnyView> {
}
private func update(theme: Theme) {
self.view.backgroundColor = theme.headerBackgroundColor
if let navigationBar = self.navigationController?.navigationBar {
theme.applyStyle(onNavigationBar: navigationBar)
}