fix: Dont loose selected events

This commit is contained in:
Krille Fear 2021-11-19 10:29:01 +01:00
parent f4425771f8
commit b65f792817

View File

@ -297,17 +297,17 @@ class ChatView extends StatelessWidget {
eventId), eventId),
longPressSelect: controller longPressSelect: controller
.selectedEvents.isEmpty, .selectedEvents.isEmpty,
selected: controller selected: controller.selectedEvents.any((e) =>
.selectedEvents e.eventId ==
.contains(controller controller
.filteredEvents[i - 1]), .filteredEvents[i - 1]
.eventId),
timeline: controller.timeline, timeline: controller.timeline,
nextEvent: i < nextEvent:
controller i < controller.filteredEvents.length
.filteredEvents ? controller
.length .filteredEvents[i]
? controller.filteredEvents[i] : null),
: null),
), ),
); );
}, },