mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-17 19:58:57 +03:00
Ensure tmp file is always deleted when it is read
This commit is contained in:
parent
fe39c92e25
commit
0b0634b531
1 changed files with 1 additions and 3 deletions
|
@ -122,14 +122,12 @@ internal class ReadReceiptHandler @Inject constructor(
|
|||
|
||||
fun getContentFromInitSync(roomId: String): ReadReceiptContent? {
|
||||
return roomSyncEphemeralTemporaryStore.read(roomId)
|
||||
?.also { roomSyncEphemeralTemporaryStore.delete(roomId) }
|
||||
?.events
|
||||
?.firstOrNull { it.type == EventType.RECEIPT }
|
||||
?.let {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
it.content as? ReadReceiptContent
|
||||
}
|
||||
?.also {
|
||||
roomSyncEphemeralTemporaryStore.delete(roomId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue