mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-27 11:09:18 +03:00
Revert "Reduce time required before updating read marker"
This reverts commit 922b62f9f5
.
Change-Id: I32fed90bdfa04d5e3dd7f222a330f84f3476d805
This commit is contained in:
parent
6b060bf1bb
commit
57fee29645
1 changed files with 2 additions and 2 deletions
|
@ -947,12 +947,12 @@ class TimelineViewModel @AssistedInject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun observeEventDisplayedActions() {
|
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.
|
// and keep the most recent one to set the read receipt on.
|
||||||
|
|
||||||
visibleEventsSource
|
visibleEventsSource
|
||||||
.stream()
|
.stream()
|
||||||
.chunk(200)
|
.chunk(500)
|
||||||
.filter { it.isNotEmpty() }
|
.filter { it.isNotEmpty() }
|
||||||
.onEach { actions ->
|
.onEach { actions ->
|
||||||
val bufferedMostRecentDisplayedEvent = actions.minByOrNull { it.event.indexOfEvent() }?.event ?: return@onEach
|
val bufferedMostRecentDisplayedEvent = actions.minByOrNull { it.event.indexOfEvent() }?.event ?: return@onEach
|
||||||
|
|
Loading…
Add table
Reference in a new issue