Revert "Reduce time required before updating read marker"

This reverts commit 922b62f9f5.

Change-Id: I32fed90bdfa04d5e3dd7f222a330f84f3476d805
This commit is contained in:
SpiritCroc 2022-03-17 10:02:55 +01:00
parent 6b060bf1bb
commit 57fee29645

View file

@ -947,12 +947,12 @@ class TimelineViewModel @AssistedInject constructor(
}
private fun observeEventDisplayedActions() {
// We are buffering scroll events 200 ms
// We are buffering scroll events for half a second
// and keep the most recent one to set the read receipt on.
visibleEventsSource
.stream()
.chunk(200)
.chunk(500)
.filter { it.isNotEmpty() }
.onEach { actions ->
val bufferedMostRecentDisplayedEvent = actions.minByOrNull { it.event.indexOfEvent() }?.event ?: return@onEach