mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-29 14:38:45 +03:00
Fix unread messages marker being hidden in collapsed membership item
Scenario: the last read event in a chat is a membership change. After that, at least two new membership changes were added, followed by normal messages. Due to the membership changes being collapsed by default, in this scenario the read marker would not show, since in the loop, we would overwrite the appendReadMarker with the value for the last eventId of the merged item, instead of showing it if any of the items matched. Change-Id: I791627df6776ebf791310eb082b648701936d565
This commit is contained in:
parent
7d377ea418
commit
00c2f271b3
1 changed files with 1 additions and 1 deletions
|
@ -73,7 +73,7 @@ class TimelineControllerInterceptorHelper(private val positionOfReadMarker: KMut
|
|||
}
|
||||
epoxyModel.getEventIds().forEach { eventId ->
|
||||
adapterPositionMapping[eventId] = index
|
||||
appendReadMarker = epoxyModel.canAppendReadMarker() && eventId == firstUnreadEventId && atLeastOneVisibleItemsBeforeReadMarker
|
||||
appendReadMarker = appendReadMarker || (epoxyModel.canAppendReadMarker() && eventId == firstUnreadEventId && atLeastOneVisibleItemsBeforeReadMarker)
|
||||
}
|
||||
}
|
||||
if (epoxyModel is DaySeparatorItem) {
|
||||
|
|
Loading…
Reference in a new issue