mirror of
https://gitlab.com/mysocialportal/relatica
synced 2024-10-18 11:13:31 +00:00
Filter out DMs and CRs when determining if newer unread notifications before loading older read notifications since those always return regardless of minimum notfication ID
Fixes Issue #101
This commit is contained in:
parent
2d27918244
commit
691a0e5d90
1 changed files with 7 additions and 1 deletions
|
@ -140,7 +140,13 @@ class NotificationsManager extends ChangeNotifier {
|
|||
if (unread.isNotEmpty) {
|
||||
final result =
|
||||
await _loadOlderUnreadNotifications(withListenerNotification);
|
||||
if (result.getValueOrElse(() => []).isNotEmpty) {
|
||||
final nonDmAndConnectionNotifications = result
|
||||
.getValueOrElse(() => [])
|
||||
.where((n) =>
|
||||
n.type != NotificationType.follow_request &&
|
||||
n.type != NotificationType.direct_message)
|
||||
.toList();
|
||||
if (nonDmAndConnectionNotifications.isNotEmpty) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue