mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 02:15:35 +03:00
Onuray's review
This commit is contained in:
parent
e33bc7146b
commit
1dfc739f19
2 changed files with 4 additions and 4 deletions
|
@ -65,11 +65,11 @@ interface ReadService {
|
|||
|
||||
/**
|
||||
* Get the eventId where the read receipt for the provided user is
|
||||
* @param otherUserId the userId param to look for
|
||||
* @param userId the id of the user to look for
|
||||
*
|
||||
* @return the eventId where the read receipt for the provided user is attached, or null if not found
|
||||
*/
|
||||
fun getUserReadReceipt(otherUserId: String): String?
|
||||
fun getUserReadReceipt(userId: String): String?
|
||||
|
||||
/**
|
||||
* Returns a live list of read receipts for a given event
|
||||
|
|
|
@ -107,10 +107,10 @@ internal class DefaultReadService @AssistedInject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
override fun getUserReadReceipt(otherUserId: String): String? {
|
||||
override fun getUserReadReceipt(userId: String): String? {
|
||||
var eventId: String? = null
|
||||
monarchy.doWithRealm {
|
||||
eventId = ReadReceiptEntity.where(it, roomId = roomId, userId = otherUserId)
|
||||
eventId = ReadReceiptEntity.where(it, roomId = roomId, userId = userId)
|
||||
.findFirst()
|
||||
?.eventId
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue