mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 11:59:12 +03:00
Cleanup
This commit is contained in:
parent
0b0634b531
commit
857bfcb971
3 changed files with 4 additions and 6 deletions
|
@ -5,7 +5,7 @@ Features ✨:
|
|||
-
|
||||
|
||||
Improvements 🙌:
|
||||
-
|
||||
- Lazy storage of ReadReceipts
|
||||
|
||||
Bugfix 🐛:
|
||||
-
|
||||
|
|
|
@ -121,13 +121,11 @@ internal class ReadReceiptHandler @Inject constructor(
|
|||
}
|
||||
|
||||
fun getContentFromInitSync(roomId: String): ReadReceiptContent? {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
return roomSyncEphemeralTemporaryStore.read(roomId)
|
||||
?.also { roomSyncEphemeralTemporaryStore.delete(roomId) }
|
||||
?.events
|
||||
?.firstOrNull { it.type == EventType.RECEIPT }
|
||||
?.let {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
it.content as? ReadReceiptContent
|
||||
}
|
||||
?.content as? ReadReceiptContent
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ internal interface RoomSyncEphemeralTemporaryStore {
|
|||
}
|
||||
|
||||
internal class RoomSyncEphemeralTemporaryStoreFile @Inject constructor(
|
||||
@SessionFilesDirectory private val fileDirectory: File
|
||||
@SessionFilesDirectory fileDirectory: File
|
||||
) : RoomSyncEphemeralTemporaryStore {
|
||||
|
||||
private val workingDir = File(fileDirectory, "rr")
|
||||
|
|
Loading…
Reference in a new issue