Avoid erasing all cache
This commit is contained in:
parent
76ade2957e
commit
3e97503220
|
@ -142,7 +142,10 @@ class TimelineEventController(private val dateFormatter: TimelineDateFormatter,
|
||||||
if (this.eventIdToHighlight != eventIdToHighlight) {
|
if (this.eventIdToHighlight != eventIdToHighlight) {
|
||||||
// Clear cache to force a refresh
|
// Clear cache to force a refresh
|
||||||
for (i in 0 until modelCache.size) {
|
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
|
this.eventIdToHighlight = eventIdToHighlight
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue