mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-30 13:16:58 +02:00
@@ -156,6 +156,8 @@
|
||||
|
||||
if (mainSession)
|
||||
{
|
||||
NSLog(@"[MasterTabBarController] initializeDataSources");
|
||||
|
||||
// Init the recents data source
|
||||
recentsDataSource = [[RecentsDataSource alloc] initWithMatrixSession:mainSession];
|
||||
|
||||
@@ -164,6 +166,31 @@
|
||||
[_peopleViewController displayList:recentsDataSource];
|
||||
[_roomsViewController displayList:recentsDataSource];
|
||||
|
||||
// Restore the right delegate of the shared recent data source.
|
||||
id<MXKDataSourceDelegate> recentsDataSourceDelegate = _homeViewController;
|
||||
RecentsDataSourceMode recentsDataSourceMode = RecentsDataSourceModeHome;
|
||||
switch (self.selectedIndex)
|
||||
{
|
||||
case TABBAR_HOME_INDEX:
|
||||
break;
|
||||
case TABBAR_FAVOURITES_INDEX:
|
||||
recentsDataSourceDelegate = _favouritesViewController;
|
||||
recentsDataSourceMode = RecentsDataSourceModeFavourites;
|
||||
break;
|
||||
case TABBAR_PEOPLE_INDEX:
|
||||
recentsDataSourceDelegate = _peopleViewController;
|
||||
recentsDataSourceMode = RecentsDataSourceModePeople;
|
||||
break;
|
||||
case TABBAR_ROOMS_INDEX:
|
||||
recentsDataSourceDelegate = _roomsViewController;
|
||||
recentsDataSourceMode = RecentsDataSourceModeRooms;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
[recentsDataSource setDelegate:recentsDataSourceDelegate andRecentsDataSourceMode:recentsDataSourceMode];
|
||||
|
||||
// Check whether there are others sessions
|
||||
NSArray* mxSessions = self.mxSessions;
|
||||
if (mxSessions.count > 1)
|
||||
|
||||
Reference in New Issue
Block a user