Mark event in permalinks or search results

This commit is contained in:
manuroe
2016-06-21 18:18:10 +02:00
parent 126c2449c8
commit eed0fad6ed
3 changed files with 120 additions and 2 deletions
+24 -1
View File
@@ -233,8 +233,31 @@
bubbleCell.blurred = YES;
}
}
// Manage initial event (case of permalink or search result)
if (self.timeline.initialEventId)
{
// Reset the marker
if (bubbleCell.markerView)
{
[bubbleCell.markerView removeFromSuperview];
}
// Check if the cell contains this initial event
for (NSUInteger index = 0; index < cellData.bubbleComponents.count; index++)
{
MXKRoomBubbleComponent *component = cellData.bubbleComponents[index];
if ([component.event.eventId isEqualToString:self.timeline.initialEventId])
{
// If yes, mark the event
[bubbleCell markComponent:index];
break;
}
}
}
}
return cell;
}