Skip to content

Commit

Permalink
Merge branch 'hotfix/1.9.8' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailgulek committed Oct 13, 2022
1 parent 7f48870 commit 9b489db
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
11 changes: 8 additions & 3 deletions Riot/Categories/UIViewController+RiotSearch.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,12 @@ - (void)showSearch:(BOOL)animated
self.navigationItem.leftBarButtonItem = nil;

// Add the search bar
self.navigationItem.titleView = self.searchBar;

UIView *searchBarContainer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 44)];
searchBarContainer.backgroundColor = [UIColor clearColor];
searchBarContainer.autoresizingMask = UIViewAutoresizingFlexibleWidth;

self.navigationItem.titleView = searchBarContainer;
[searchBarContainer addSubview:self.searchBar];
self.extendedLayoutIncludesOpaqueBars = YES;

// On iPad, there is no cancel button inside the UISearchBar
Expand Down Expand Up @@ -177,8 +181,9 @@ - (UIViewControllerRiotSearchInternals *)searchInternals
// Initialise internal data at the first call
searchInternals = [[UIViewControllerRiotSearchInternals alloc] init];

UISearchBar *searchBar = [[UISearchBar alloc] init];
UISearchBar *searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 44)];
searchBar.showsCancelButton = YES;
searchBar.autoresizingMask = UIViewAutoresizingFlexibleWidth;
searchBar.delegate = (id<UISearchBarDelegate>)self;
searchInternals.searchBar = searchBar;

Expand Down
10 changes: 7 additions & 3 deletions Riot/Modules/Common/SwiftUI/VectorHostingController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,13 @@ class VectorHostingController: UIHostingController<AnyView> {
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() {
Expand Down
1 change: 1 addition & 0 deletions changelog.d/6762.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Element freezes after searching in a room.
1 change: 1 addition & 0 deletions changelog.d/6833.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
All Chats: Fix a header glitch when aborting a pop gesture.

0 comments on commit 9b489db

Please sign in to comment.