chore: Load chat at last read marker

This commit is contained in:
Krille 2023-04-14 14:23:58 +02:00
commit a5d0c4795a
3 changed files with 34 additions and 46 deletions

View file

@ -336,33 +336,6 @@ class ChatView extends StatelessWidget {
],
),
),
if (!controller.lastReadEventVisible &&
controller.timeline!.allowNewEvent)
Positioned(
top: 16,
left: 0,
right: 0,
child: Center(
child: FloatingActionButton.extended(
icon: const Icon(Icons.arrow_upward_outlined),
onPressed: () => controller.scrollToEventId(
controller.room.fullyRead,
),
label: Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(L10n.of(context)!.jumpToLastReadMessage),
IconButton(
onPressed: () => controller.setReadMarker(
eventId: controller.room.fullyRead,
),
icon: const Icon(Icons.close),
),
],
),
),
),
),
if (controller.dragging)
Container(
color: Theme.of(context)