Add some missed read receipt debugging
Change-Id: I431f18d433b49e382b70bc14dc999ca14e8f05f3
This commit is contained in:
parent
3704d9de3b
commit
b65bd730b8
|
@ -128,7 +128,7 @@ internal fun computeIsUnique(
|
|||
}
|
||||
}
|
||||
|
||||
val rrDimber = Dimber("ReadReceipts", DbgUtil.DBG_READ_RECEIPTS)
|
||||
private val rrDimber = Dimber("ReadReceipts", DbgUtil.DBG_READ_RECEIPTS)
|
||||
|
||||
private fun handleReadReceipts(realm: Realm, roomId: String, eventEntity: EventEntity, senderId: String): ReadReceiptsSummaryEntity {
|
||||
val readReceiptsSummaryEntity = ReadReceiptsSummaryEntity.where(realm, eventEntity.eventId).findFirst()
|
||||
|
|
|
@ -32,7 +32,7 @@ internal class ReadReceiptsSummaryMapper @Inject constructor(
|
|||
private val realmSessionProvider: RealmSessionProvider
|
||||
) {
|
||||
|
||||
val rrDimber = Dimber("ReadReceipts", DbgUtil.DBG_READ_RECEIPTS)
|
||||
private val rrDimber = Dimber("ReadReceipts", DbgUtil.DBG_READ_RECEIPTS)
|
||||
|
||||
fun map(readReceiptsSummaryEntity: ReadReceiptsSummaryEntity?): List<ReadReceipt> {
|
||||
if (readReceiptsSummaryEntity == null) {
|
||||
|
@ -52,7 +52,7 @@ internal class ReadReceiptsSummaryMapper @Inject constructor(
|
|||
private fun map(readReceipts: RealmList<ReadReceiptEntity>, realm: Realm): List<ReadReceipt> {
|
||||
return readReceipts
|
||||
.mapNotNull {
|
||||
rrDimber.i{"Map ${it.eventId} receipt ${it.userId} thread ${it.threadId}"}
|
||||
rrDimber.i{"Map ${it.roomId} / ${it.userId} thread ${it.threadId}: event ${it.eventId}"}
|
||||
val roomMember = RoomMemberSummaryEntity.where(realm, roomId = it.roomId, userId = it.userId).findFirst()
|
||||
?: return@mapNotNull null
|
||||
ReadReceipt(roomMember.asDomain(), it.originServerTs.toLong(), it.threadId)
|
||||
|
|
|
@ -49,7 +49,7 @@ internal class ReadReceiptHandler @Inject constructor(
|
|||
private val roomSyncEphemeralTemporaryStore: RoomSyncEphemeralTemporaryStore
|
||||
) {
|
||||
|
||||
val rrDimber = Dimber("ReadReceipts", DbgUtil.DBG_READ_RECEIPTS)
|
||||
private val rrDimber = Dimber("ReadReceipts", DbgUtil.DBG_READ_RECEIPTS)
|
||||
|
||||
companion object {
|
||||
|
||||
|
@ -129,6 +129,7 @@ internal class ReadReceiptHandler @Inject constructor(
|
|||
summariesByEventId[eventId] = readReceiptsSummary
|
||||
}
|
||||
mainReceiptByUserId.forEach {
|
||||
rrDimber.i{"Handle initial sync RR $roomId / ${it.value.userId} thread ${it.value.threadId}: event ${it.value.eventId}"}
|
||||
summariesByEventId[it.value.eventId]?.readReceipts?.add(it.value)
|
||||
}
|
||||
realm.insertOrUpdate(readReceiptSummaries)
|
||||
|
|
Loading…
Reference in New Issue