improve chat list view

This commit is contained in:
otsmr 2026-04-06 00:24:17 +02:00
parent 267e2bd376
commit 02ae72f679
2 changed files with 9 additions and 2 deletions

View file

@ -209,6 +209,7 @@ Future<void> showLocalPushNotification(
(pushNotification.kind == PushKind.text ||
pushNotification.kind == PushKind.response ||
pushNotification.kind == PushKind.reactionToAudio ||
pushNotification.kind == PushKind.storedMediaFile ||
pushNotification.kind == PushKind.reactionToImage ||
pushNotification.kind == PushKind.reactionToText ||
pushNotification.kind == PushKind.reactionToAudio)) {

View file

@ -128,8 +128,14 @@ class _UserListItem extends State<GroupListItem> {
}
} else {
// there are no not opened messages show just the last message in the table
_currentMessage = newLastMessage;
_previewMessages = [newLastMessage];
// only shows the last message in case there was no newer messages which already got deleted
// This prevents, that it will show that a images got stored 10 days ago...
if (newLastMessage.createdAt.isAfter(
widget.group.lastMessageExchange.subtract(const Duration(minutes: 10)),
)) {
_currentMessage = newLastMessage;
_previewMessages = [newLastMessage];
}
}
final msgs = _previewMessages