mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-04-18 14:22:53 +00:00
improve chat list view
This commit is contained in:
parent
267e2bd376
commit
02ae72f679
2 changed files with 9 additions and 2 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue