mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-02 04:46:47 +01: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.
This commit is contained in:
parent
910c0ff326
commit
e61fc1a935
@ -73,7 +73,8 @@ 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 New Issue
Block a user