mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Fix vector-im/element-ios/issues/6004 - Reset home filters when switching tabs.
This commit is contained in:
parent
c4b4a33ffb
commit
671197699a
5 changed files with 30 additions and 3 deletions
|
@ -64,10 +64,14 @@
|
||||||
[super viewWillAppear:animated];
|
[super viewWillAppear:animated];
|
||||||
[AppDelegate theDelegate].masterTabBarController.tabBar.tintColor = ThemeService.shared.theme.tintColor;
|
[AppDelegate theDelegate].masterTabBarController.tabBar.tintColor = ThemeService.shared.theme.tintColor;
|
||||||
|
|
||||||
if (recentsDataSource)
|
if (recentsDataSource.recentsDataSourceMode != RecentsDataSourceModeFavourites)
|
||||||
{
|
{
|
||||||
// Take the lead on the shared data source.
|
// Take the lead on the shared data source.
|
||||||
[recentsDataSource setDelegate:self andRecentsDataSourceMode:RecentsDataSourceModeFavourites];
|
[recentsDataSource setDelegate:self andRecentsDataSourceMode:RecentsDataSourceModeFavourites];
|
||||||
|
|
||||||
|
// Reset filtering on the shared data source when switching tabs
|
||||||
|
[recentsDataSource searchWithPatterns:nil];
|
||||||
|
[self.recentsSearchBar setText:nil];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -112,6 +112,10 @@
|
||||||
{
|
{
|
||||||
// Take the lead on the shared data source.
|
// Take the lead on the shared data source.
|
||||||
[recentsDataSource setDelegate:self andRecentsDataSourceMode:RecentsDataSourceModeHome];
|
[recentsDataSource setDelegate:self andRecentsDataSourceMode:RecentsDataSourceModeHome];
|
||||||
|
|
||||||
|
// Reset filtering on the shared data source when switching tabs
|
||||||
|
[self searchBarCancelButtonClicked:self.recentsSearchBar];
|
||||||
|
[self.recentsSearchBar setText:nil];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,16 @@
|
||||||
{
|
{
|
||||||
// Take the lead on the shared data source.
|
// Take the lead on the shared data source.
|
||||||
recentsDataSource = (RecentsDataSource*)self.dataSource;
|
recentsDataSource = (RecentsDataSource*)self.dataSource;
|
||||||
[recentsDataSource setDelegate:self andRecentsDataSourceMode:RecentsDataSourceModePeople];
|
|
||||||
|
if (recentsDataSource.recentsDataSourceMode != RecentsDataSourceModePeople)
|
||||||
|
{
|
||||||
|
// Take the lead on the shared data source.
|
||||||
|
[recentsDataSource setDelegate:self andRecentsDataSourceMode:RecentsDataSourceModePeople];
|
||||||
|
|
||||||
|
// Reset filtering on the shared data source when switching tabs
|
||||||
|
[recentsDataSource searchWithPatterns:nil];
|
||||||
|
[self.recentsSearchBar setText:nil];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,16 @@
|
||||||
{
|
{
|
||||||
// Take the lead on the shared data source.
|
// Take the lead on the shared data source.
|
||||||
recentsDataSource = (RecentsDataSource*)self.dataSource;
|
recentsDataSource = (RecentsDataSource*)self.dataSource;
|
||||||
[recentsDataSource setDelegate:self andRecentsDataSourceMode:RecentsDataSourceModeRooms];
|
|
||||||
|
if (recentsDataSource.recentsDataSourceMode != RecentsDataSourceModeRooms)
|
||||||
|
{
|
||||||
|
// Take the lead on the shared data source.
|
||||||
|
[recentsDataSource setDelegate:self andRecentsDataSourceMode:RecentsDataSourceModeRooms];
|
||||||
|
|
||||||
|
// Reset filtering on the shared data source when switching tabs
|
||||||
|
[recentsDataSource searchWithPatterns:nil];
|
||||||
|
[self.recentsSearchBar setText:nil];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
1
changelog.d/6004.bugfix
Normal file
1
changelog.d/6004.bugfix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Reset home filters when switching tabs.
|
Loading…
Reference in a new issue