Navigate to thread view for search results in threads

This commit is contained in:
ismailgulek
2021-12-01 01:22:16 +03:00
parent 5237963986
commit f6208a69e5
7 changed files with 39 additions and 93 deletions
@@ -209,18 +209,16 @@
{
// Data in the cells are actually Vector RoomBubbleCellData
RoomBubbleCellData *cellData = (RoomBubbleCellData*)[self.dataSource cellDataAtIndex:indexPath.row];
_selectedEvent = cellData.bubbleComponents[0].event;
MXEvent *event = cellData.bubbleComponents[0].event;
RoomSearchViewController *roomSearchViewController = (RoomSearchViewController*)self.parentViewController;
// Hide the keyboard handled by the search text input which belongs to RoomSearchViewController
[((RoomSearchViewController*)self.parentViewController).searchBar resignFirstResponder];
[roomSearchViewController.searchBar resignFirstResponder];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
// Make the RoomSearchViewController (that contains this VC) open the RoomViewController
[self.parentViewController performSegueWithIdentifier:@"showTimeline" sender:self];
// Reset the selected event. RoomSearchViewController got it when here
_selectedEvent = nil;
[roomSearchViewController selectEvent:event];
}
@end