mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 05:31:21 +03:00
Pagination do not set ageLocalTs
This commit is contained in:
parent
f8452429a4
commit
9aa0d38116
1 changed files with 3 additions and 1 deletions
|
@ -207,13 +207,15 @@ internal class TokenChunkEventPersistor @Inject constructor(@SessionDatabase pri
|
|||
roomMemberContentsByUser[stateEvent.stateKey] = stateEvent.content.toModel<RoomMemberContent>()
|
||||
}
|
||||
}
|
||||
val now = System.currentTimeMillis()
|
||||
val eventIds = ArrayList<String>(eventList.size)
|
||||
for (event in eventList) {
|
||||
if (event.eventId == null || event.senderId == null) {
|
||||
continue
|
||||
}
|
||||
val ageLocalTs = event.unsignedData?.age?.let { now - it }
|
||||
eventIds.add(event.eventId)
|
||||
val eventEntity = event.toEntity(roomId, SendState.SYNCED).copyToRealmOrIgnore(realm)
|
||||
val eventEntity = event.toEntity(roomId, SendState.SYNCED, ageLocalTs).copyToRealmOrIgnore(realm)
|
||||
if (event.type == EventType.STATE_ROOM_MEMBER && event.stateKey != null) {
|
||||
val contentToUse = if (direction == PaginationDirection.BACKWARDS) {
|
||||
event.prevContent
|
||||
|
|
Loading…
Reference in a new issue