diff --git a/Riot/Modules/Common/SwiftUI/VectorHostingController.swift b/Riot/Modules/Common/SwiftUI/VectorHostingController.swift index 98faba5c0..493c29560 100644 --- a/Riot/Modules/Common/SwiftUI/VectorHostingController.swift +++ b/Riot/Modules/Common/SwiftUI/VectorHostingController.swift @@ -88,9 +88,13 @@ class VectorHostingController: UIHostingController { override func viewWillLayoutSubviews() { super.viewWillLayoutSubviews() - if let navigationController = navigationController, navigationController.isNavigationBarHidden != isNavigationBarHidden { - navigationController.isNavigationBarHidden = isNavigationBarHidden - } + guard + let navigationController = navigationController, + navigationController.topViewController == self, + navigationController.isNavigationBarHidden != isNavigationBarHidden + else { return } + + navigationController.isNavigationBarHidden = isNavigationBarHidden } override func viewDidLayoutSubviews() { diff --git a/changelog.d/6833.bugfix b/changelog.d/6833.bugfix new file mode 100644 index 000000000..4ea819b83 --- /dev/null +++ b/changelog.d/6833.bugfix @@ -0,0 +1 @@ +All Chats: Fix a header glitch when aborting a pop gesture.