mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-09-01 07:04:07 +00:00
bug fix
This commit is contained in:
parent
7e6bfa49ea
commit
b92ff26e81
1 changed files with 14 additions and 7 deletions
|
|
@ -235,13 +235,20 @@ class _ChatMessagesViewState extends State<ChatMessagesView>
|
||||||
messages = chatItems.reversed.toList();
|
messages = chatItems.reversed.toList();
|
||||||
});
|
});
|
||||||
|
|
||||||
if (wasSentByMe && itemScrollController.isAttached) {
|
if (wasSentByMe) {
|
||||||
unawaited(
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
itemScrollController.scrollTo(
|
if (!mounted || !itemScrollController.isAttached) return;
|
||||||
index: 0,
|
try {
|
||||||
duration: const Duration(milliseconds: 150),
|
unawaited(
|
||||||
),
|
itemScrollController.scrollTo(
|
||||||
);
|
index: 0,
|
||||||
|
duration: const Duration(milliseconds: 150),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} catch (_) {
|
||||||
|
// Ignore if the inner scroll controller is still not attached
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
final items = await MemoryItem.convertFromMessages(storedMediaFiles);
|
final items = await MemoryItem.convertFromMessages(storedMediaFiles);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue