SchildiChat-android/matrix-sdk-android
SpiritCroc 3b6b51748e Fix clearing read but not synced messages in notifications
When lots (> 10) of messages arrive in a chat, such that not all get
/sync'ed, the app couldn't properly check if events that were not synced
are before or after the read marker.
The previous way to handle this was just to always assume these events
would be unread, which caused some old messages show in notifications
and not dismiss themselves when appropriate.

Unfortunately, we can not safely assume that if the read marker is in the
latest chunk, the missing events would be read, since we may be showing
"fastlane" notifications from fcm/push before the /sync finished.

Thus, with this commit, we now remove messages that weren't synced or
paginated if they meet the following heuristic:

1. The read marker is in the latest chunk and
2. The read marker points at an event with a timestamp later than the one of the missing event.

Change-Id: I8053252e95a3b2142512f93244647a86b6f1a231
2022-06-22 12:36:16 +02:00
..
docs Package have been renamed, so also rename it here. 2022-05-20 21:14:42 +02:00
src Fix clearing read but not synced messages in notifications 2022-06-22 12:36:16 +02:00
.gitignore
build.gradle Prepare hotfix 1.4.20 2022-06-13 12:37:39 +02:00
proguard-rules.pro Remove dependency to org.greenrobot.eventbus library 2021-01-05 18:56:24 +01:00