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 🙌:
|
Improvements 🙌:
|
||||||
-
|
- Lazy storage of ReadReceipts
|
||||||
|
|
||||||
Bugfix 🐛:
|
Bugfix 🐛:
|
||||||
-
|
-
|
||||||
|
|
|
@ -121,13 +121,11 @@ internal class ReadReceiptHandler @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getContentFromInitSync(roomId: String): ReadReceiptContent? {
|
fun getContentFromInitSync(roomId: String): ReadReceiptContent? {
|
||||||
|
@Suppress("UNCHECKED_CAST")
|
||||||
return roomSyncEphemeralTemporaryStore.read(roomId)
|
return roomSyncEphemeralTemporaryStore.read(roomId)
|
||||||
?.also { roomSyncEphemeralTemporaryStore.delete(roomId) }
|
?.also { roomSyncEphemeralTemporaryStore.delete(roomId) }
|
||||||
?.events
|
?.events
|
||||||
?.firstOrNull { it.type == EventType.RECEIPT }
|
?.firstOrNull { it.type == EventType.RECEIPT }
|
||||||
?.let {
|
?.content as? ReadReceiptContent
|
||||||
@Suppress("UNCHECKED_CAST")
|
|
||||||
it.content as? ReadReceiptContent
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ internal interface RoomSyncEphemeralTemporaryStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class RoomSyncEphemeralTemporaryStoreFile @Inject constructor(
|
internal class RoomSyncEphemeralTemporaryStoreFile @Inject constructor(
|
||||||
@SessionFilesDirectory private val fileDirectory: File
|
@SessionFilesDirectory fileDirectory: File
|
||||||
) : RoomSyncEphemeralTemporaryStore {
|
) : RoomSyncEphemeralTemporaryStore {
|
||||||
|
|
||||||
private val workingDir = File(fileDirectory, "rr")
|
private val workingDir = File(fileDirectory, "rr")
|
||||||
|
|
Loading…
Reference in a new issue