tweak scroll behavior

This commit is contained in:
Henry Hiles 2026-09-26 14:52:24 -04:00
commit d712bb3193
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
2 changed files with 53 additions and 57 deletions

View file

@ -59,9 +59,7 @@ class const ChatTimeline({
jumpToId: jumpToId,
getEventOptions: getEventOptions,
highlightedEvent: highlightedEvent,
key: index == 0
? scroll.anchorItemKey
: ValueKey(scroll.liveItems[index].eventId),
key: scroll.keyFor(scroll.liveItems[index].eventId),
),
),
@ -74,7 +72,7 @@ class const ChatTimeline({
jumpToId: jumpToId,
getEventOptions: getEventOptions,
highlightedEvent: highlightedEvent,
key: ValueKey(scroll.historyItems[index].eventId),
key: scroll.keyFor(scroll.historyItems[index].eventId),
),
),
],