Scroll to bottom if the new event is from me, even if sent from another device #1877.

This fixes the issue that the timeline does not scroll when sending an attachment to the room, since there is no local echo (yet) for such event.
This commit is contained in:
Benoit Marty 2023-12-14 21:59:04 +01:00
parent 4aad49d424
commit 8438b6937d
2 changed files with 4 additions and 4 deletions

View file

@ -213,7 +213,8 @@ class TimelinePresenter @AssistedInject constructor(
newMostRecentItemId != prevMostRecentItemIdValue
if (hasNewEvent) {
val newMostRecentEvent = newMostRecentItem as? TimelineItem.Event
val fromMe = newMostRecentEvent?.localSendState != null
// Scroll to bottom if the new event is from me, even if sent from another device
val fromMe = newMostRecentEvent?.isMine == true
newEventState.value = if (fromMe) {
NewEventState.FromMe
} else {