mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 05:31:21 +03:00
Avoid deleting sent messages on non room events
This commit is contained in:
parent
f025554612
commit
3656896af9
1 changed files with 3 additions and 0 deletions
|
@ -514,6 +514,9 @@ internal class RoomSyncHandler @Inject constructor(private val readReceiptHandle
|
|||
* we clear all SENT events, and we are sure that we will receive it from /sync or pagination
|
||||
*/
|
||||
private fun fixStuckLocalEcho(rooms: List<RoomEntity>) {
|
||||
// when there are not room events, there is no need to delete SENT messages
|
||||
// this might be useful for events like typing etc
|
||||
if(rooms.isNullOrEmpty()) return
|
||||
rooms.forEach { roomEntity ->
|
||||
roomEntity.sendingTimelineEvents.filter { timelineEvent ->
|
||||
timelineEvent.root?.sendState == SendState.SENT
|
||||
|
|
Loading…
Reference in a new issue