diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/helper/ChunkEntityHelper.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/helper/ChunkEntityHelper.kt index 9a89eea00f..aa1bb401ab 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/helper/ChunkEntityHelper.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/helper/ChunkEntityHelper.kt @@ -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() diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/mapper/ReadReceiptsSummaryMapper.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/mapper/ReadReceiptsSummaryMapper.kt index 4375b5c83a..cbab183967 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/mapper/ReadReceiptsSummaryMapper.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/mapper/ReadReceiptsSummaryMapper.kt @@ -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 { if (readReceiptsSummaryEntity == null) { @@ -52,7 +52,7 @@ internal class ReadReceiptsSummaryMapper @Inject constructor( private fun map(readReceipts: RealmList, realm: Realm): List { 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) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/room/ReadReceiptHandler.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/room/ReadReceiptHandler.kt index d34806f6c3..16c9ed8ef7 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/room/ReadReceiptHandler.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/room/ReadReceiptHandler.kt @@ -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)