mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 17:12:45 +02:00
Highlight thread root event in the timeline
This commit is contained in:
@@ -55,6 +55,12 @@
|
||||
*/
|
||||
@property(nonatomic, nullable) NSArray<TypingUserInfo *> *currentTypingUsers;
|
||||
|
||||
/**
|
||||
Identifier of the event to be highlighted. Default is nil.
|
||||
Data source owner should reload the view itself to reflect changes, and nullify the parameter afterwards when it doesn't highlight the event anymore.
|
||||
*/
|
||||
@property (nonatomic, nullable) NSString *highlightedEventId;
|
||||
|
||||
/**
|
||||
Check if there is an active jitsi widget in the room and return it.
|
||||
|
||||
|
||||
@@ -774,14 +774,15 @@ const CGFloat kTypingCellHeight = 24;
|
||||
}
|
||||
|
||||
// Manage initial event (case of permalink or search result)
|
||||
if (self.timeline.initialEventId && self.markTimelineInitialEvent)
|
||||
if ((self.timeline.initialEventId && self.markTimelineInitialEvent) || self.highlightedEventId)
|
||||
{
|
||||
// Check if the cell contains this initial event
|
||||
for (NSUInteger index = 0; index < bubbleComponents.count; index++)
|
||||
{
|
||||
MXKRoomBubbleComponent *component = bubbleComponents[index];
|
||||
|
||||
if ([component.event.eventId isEqualToString:self.timeline.initialEventId])
|
||||
if ([component.event.eventId isEqualToString:self.timeline.initialEventId]
|
||||
|| [component.event.eventId isEqualToString:self.highlightedEventId])
|
||||
{
|
||||
// If yes, mark the event
|
||||
[bubbleCell markComponent:index];
|
||||
|
||||
Reference in New Issue
Block a user