diff --git a/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/TimelineEventController.kt b/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/TimelineEventController.kt index 311355cec6..a93a948fe2 100644 --- a/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/TimelineEventController.kt +++ b/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/TimelineEventController.kt @@ -142,7 +142,10 @@ class TimelineEventController(private val dateFormatter: TimelineDateFormatter, if (this.eventIdToHighlight != eventIdToHighlight) { // Clear cache to force a refresh for (i in 0 until modelCache.size) { - modelCache[i] = null + if (modelCache[i]?.eventId == eventIdToHighlight + || modelCache[i]?.eventId == this.eventIdToHighlight) { + modelCache[i] = null + } } this.eventIdToHighlight = eventIdToHighlight