Fix vector-im/element-ios/issues/6004 - Reset home filters when switching tabs.

This commit is contained in:
Stefan Ceriu
2022-04-12 11:23:26 +03:00
committed by Stefan Ceriu
parent 72f72142ed
commit e7ea79c2cb
5 changed files with 30 additions and 3 deletions
+10 -1
View File
@@ -72,7 +72,16 @@
{
// Take the lead on the shared data source.
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];
}
}
}