mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-04-18 21:12:54 +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.text ||
|
||||||
pushNotification.kind == PushKind.response ||
|
pushNotification.kind == PushKind.response ||
|
||||||
pushNotification.kind == PushKind.reactionToAudio ||
|
pushNotification.kind == PushKind.reactionToAudio ||
|
||||||
|
pushNotification.kind == PushKind.storedMediaFile ||
|
||||||
pushNotification.kind == PushKind.reactionToImage ||
|
pushNotification.kind == PushKind.reactionToImage ||
|
||||||
pushNotification.kind == PushKind.reactionToText ||
|
pushNotification.kind == PushKind.reactionToText ||
|
||||||
pushNotification.kind == PushKind.reactionToAudio)) {
|
pushNotification.kind == PushKind.reactionToAudio)) {
|
||||||
|
|
|
||||||
|
|
@ -128,9 +128,15 @@ class _UserListItem extends State<GroupListItem> {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// there are no not opened messages show just the last message in the table
|
// there are no not opened messages show just the last message in the table
|
||||||
|
// 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;
|
_currentMessage = newLastMessage;
|
||||||
_previewMessages = [newLastMessage];
|
_previewMessages = [newLastMessage];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
final msgs = _previewMessages
|
final msgs = _previewMessages
|
||||||
.where((x) => x.type == MessageType.media.name)
|
.where((x) => x.type == MessageType.media.name)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue