Enhance tap on room predecessor cell used to go back to the old version of the room (Fix issue #2179)

This commit is contained in:
SBiOSoftWhare
2019-02-04 15:49:49 +01:00
parent 19ddb1e07c
commit ebe6250211
5 changed files with 22 additions and 8 deletions
+17 -2
View File
@@ -2005,8 +2005,23 @@
}
else if (tappedEvent)
{
// Highlight this event in displayed message
[self selectEventWithId:tappedEvent.eventId];
if (tappedEvent.eventType == MXEventTypeRoomCreate)
{
// Handle tap on RoomPredecessorBubbleCell
MXRoomCreateContent *createContent = [MXRoomCreateContent modelFromJSON:tappedEvent.content];
NSString *predecessorRoomId = createContent.roomPredecessorInfo.roomId;
if (predecessorRoomId)
{
// Show predecessor room
[[AppDelegate theDelegate] showRoom:predecessorRoomId andEventId:nil withMatrixSession:self.mainSession];
}
}
else
{
// Highlight this event in displayed message
[self selectEventWithId:tappedEvent.eventId];
}
}
// Force table refresh