Add thread decoration views for search results, fix #5268

This commit is contained in:
ismailgulek
2022-01-18 14:44:56 +03:00
parent e1203f8218
commit a4f7956d42
12 changed files with 282 additions and 13 deletions
@@ -156,18 +156,29 @@
}
- (void)showRoomWithId:(NSString*)roomId
andEventId:(NSString*)eventId
andEvent:(MXEvent*)event
inMatrixSession:(MXSession*)session
{
ScreenPresentationParameters *presentationParameters = [[ScreenPresentationParameters alloc] initWithRestoreInitialDisplay:NO stackAboveVisibleViews:NO];
ThreadParameters *threadParameters = nil;
if (event.threadId)
{
threadParameters = [[ThreadParameters alloc] initWithThreadId:event.threadId
stackRoomScreen:NO];
}
else if ([self.mainSession.threadingService isEventThreadRoot:event])
{
threadParameters = [[ThreadParameters alloc] initWithThreadId:event.eventId
stackRoomScreen:NO];
}
ScreenPresentationParameters *screenParameters = [[ScreenPresentationParameters alloc] initWithRestoreInitialDisplay:NO stackAboveVisibleViews:NO];
RoomNavigationParameters *parameters = [[RoomNavigationParameters alloc] initWithRoomId:roomId
eventId:eventId
mxSession:session
threadParameters:nil
presentationParameters:presentationParameters];
[[AppDelegate theDelegate] showRoomWithParameters:parameters];
eventId:event.eventId
mxSession:self.mainSession
threadParameters:threadParameters
presentationParameters:screenParameters];
[[LegacyAppDelegate theDelegate] showRoomWithParameters:parameters];
}
#pragma mark - MXKDataSourceDelegate
@@ -264,7 +275,7 @@
// Make the master tabBar view controller open the RoomViewController
[self showRoomWithId:cellData.roomId
andEventId:_selectedEvent.eventId
andEvent:_selectedEvent
inMatrixSession:cellData.mxSession];
// Reset the selected event. HomeViewController got it when here