diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/timeline/TimelineEvent.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/timeline/TimelineEvent.kt index 7010a80233..32f6b94cd8 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/timeline/TimelineEvent.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/timeline/TimelineEvent.kt @@ -38,6 +38,9 @@ import org.matrix.android.sdk.api.util.ContentUtils.extractUsefulTextFromReply */ data class TimelineEvent( val root: Event, + /** + * Uniquely identify an event, computed locally by the sdk + */ val localId: Long, val eventId: String, val displayIndex: Int, diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/TimelineEventController.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/TimelineEventController.kt index 9acd34c827..41d9fd6de2 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/TimelineEventController.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/TimelineEventController.kt @@ -427,6 +427,7 @@ class TimelineEventController @Inject constructor(private val dateFormatter: Vec val formattedDayModel: DaySeparatorItem? = null ) { fun shouldTriggerBuild(): Boolean { + // Since those items can change when we paginate, force a re-build return mergedHeaderModel != null || formattedDayModel != null } }