don't reverse CustomScrollView

Reviewed-on: #34
This commit is contained in:
Henry Hiles 2026-06-02 21:09:35 -04:00
commit 99270f4bd1
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
2 changed files with 85 additions and 31 deletions

View file

@ -38,16 +38,13 @@ class RoomChatController extends AsyncNotifier<IList<Event>> {
loadOlder();
}
return IMap<int, int?>.fromValues(
keyMapper: (id) => 9999999999 + (id ?? 0),
values: room.sticky,
)
.addAll(room.timeline)
.toEntryIList(compare: (a, b) => (b?.key ?? 0).compareTo(a?.key ?? 0))
return room.timeline
.toEntryIList(compare: (a, b) => (a?.key ?? 0).compareTo(b?.key ?? 0))
.map((element) => element.value)
.toIList()
.addAll(room.sticky)
.map((entry) {
final foundEvent = entry.value == null
? null
: room.events[entry.value!];
final foundEvent = entry == null ? null : room.events[entry];
final editedEvent =
foundEvent == null || foundEvent.lastEditRowId == 0