From 208da5c428ef024172e143cd4c58a8845d551bad Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Thu, 19 May 2022 15:51:50 +0300 Subject: [PATCH 1/4] Fix home screen shrinking too much on keyboard opening. --- ...HomeViewControllerWithBannerWrapperViewController.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Riot/Modules/Home/VersionCheck/HomeViewControllerWithBannerWrapperViewController.swift b/Riot/Modules/Home/VersionCheck/HomeViewControllerWithBannerWrapperViewController.swift index b39b5723f9..4f9c783dbe 100644 --- a/Riot/Modules/Home/VersionCheck/HomeViewControllerWithBannerWrapperViewController.swift +++ b/Riot/Modules/Home/VersionCheck/HomeViewControllerWithBannerWrapperViewController.swift @@ -44,11 +44,16 @@ class HomeViewControllerWithBannerWrapperViewController: UIViewController, MXKVi view.backgroundColor = .clear stackView = UIStackView() + stackView.translatesAutoresizingMaskIntoConstraints = false stackView.axis = .vertical stackView.distribution = .fill stackView.alignment = .fill - view.vc_addSubViewMatchingParentSafeArea(stackView) + view.addSubview(stackView) + NSLayoutConstraint.activate([stackView.topAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.topAnchor), + stackView.leftAnchor.constraint(equalTo: self.view.leftAnchor), + stackView.rightAnchor.constraint(equalTo: self.view.rightAnchor), + stackView.bottomAnchor.constraint(equalTo: self.view.bottomAnchor)]) addChild(homeViewController) stackView.addArrangedSubview(homeViewController.view) From 6b5dc8dcf10938182e3cf4932106df1e5918c04f Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Thu, 19 May 2022 15:53:04 +0300 Subject: [PATCH 2/4] #4769, #6130 - Fix filtering search bar cancel button not clearing the results. --- Riot/Modules/Common/Recents/RecentsViewController.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Riot/Modules/Common/Recents/RecentsViewController.m b/Riot/Modules/Common/Recents/RecentsViewController.m index dbe84405f8..6e7bd5b953 100644 --- a/Riot/Modules/Common/Recents/RecentsViewController.m +++ b/Riot/Modules/Common/Recents/RecentsViewController.m @@ -2274,7 +2274,8 @@ - (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar self.recentsTableView.contentOffset = CGPointMake(0, self.recentsSearchBar.frame.size.height); self.recentsTableView.tableHeaderView = nil; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - [self refreshRecentsTable]; + [self.recentsDataSource searchWithPatterns:nil]; + [self.recentsSearchBar setText:nil]; }); } From 3661900f2f7ee7be74da13cb8ea693a0a262633b Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Thu, 19 May 2022 15:53:35 +0300 Subject: [PATCH 3/4] #6130, #4769 - Fix home screen not resetting on tab switching --- Riot/Modules/Home/HomeViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Riot/Modules/Home/HomeViewController.m b/Riot/Modules/Home/HomeViewController.m index d842baa44b..d90131222a 100644 --- a/Riot/Modules/Home/HomeViewController.m +++ b/Riot/Modules/Home/HomeViewController.m @@ -114,7 +114,7 @@ - (void)viewWillAppear:(BOOL)animated [recentsDataSource setDelegate:self andRecentsDataSourceMode:RecentsDataSourceModeHome]; // Reset filtering on the shared data source when switching tabs - [self searchBarCancelButtonClicked:self.recentsSearchBar]; + [recentsDataSource searchWithPatterns:nil]; [self.recentsSearchBar setText:nil]; } } From e016e7518926ae1e0cab8e6b4fa65a3361d32395 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Thu, 19 May 2022 16:00:02 +0300 Subject: [PATCH 4/4] Add changelogs --- changelog.d/6130.bugfix | 1 + changelog.d/pr-6184.bugfix | 1 + 2 files changed, 2 insertions(+) create mode 100644 changelog.d/6130.bugfix create mode 100644 changelog.d/pr-6184.bugfix diff --git a/changelog.d/6130.bugfix b/changelog.d/6130.bugfix new file mode 100644 index 0000000000..f6f67257a0 --- /dev/null +++ b/changelog.d/6130.bugfix @@ -0,0 +1 @@ +Fixed filtering search bar not resetting properly when cancelling or switching tabs. \ No newline at end of file diff --git a/changelog.d/pr-6184.bugfix b/changelog.d/pr-6184.bugfix new file mode 100644 index 0000000000..e2ab82f551 --- /dev/null +++ b/changelog.d/pr-6184.bugfix @@ -0,0 +1 @@ +Fixed home screen shrinking too much on opening the keyboard. \ No newline at end of file