From fd3613109da0a8a00fbc050fa98875fd30a59373 Mon Sep 17 00:00:00 2001 From: Grishka Date: Mon, 4 Apr 2022 02:28:21 +0300 Subject: [PATCH] Fix notifications --- .../android/fragments/NotificationsListFragment.java | 2 +- .../main/java/org/joinmastodon/android/model/Notification.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/NotificationsListFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/NotificationsListFragment.java index f7d65c52..e6c3c1fd 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/NotificationsListFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/NotificationsListFragment.java @@ -90,7 +90,7 @@ public class NotificationsListFragment extends BaseStatusListFragment result){ if(refreshing) relationships.clear(); - onDataLoaded(result, !result.isEmpty()); + onDataLoaded(result.stream().filter(n->n.type!=null).collect(Collectors.toList()), !result.isEmpty()); Set needRelationships=result.stream() .filter(ntf->ntf.status==null && !relationships.containsKey(ntf.account.id)) .map(ntf->ntf.account.id) diff --git a/mastodon/src/main/java/org/joinmastodon/android/model/Notification.java b/mastodon/src/main/java/org/joinmastodon/android/model/Notification.java index 41a1346a..545028ad 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/model/Notification.java +++ b/mastodon/src/main/java/org/joinmastodon/android/model/Notification.java @@ -12,7 +12,7 @@ import java.time.Instant; public class Notification extends BaseModel implements DisplayItemsParent{ @RequiredField public String id; - @RequiredField +// @RequiredField public Type type; @RequiredField public Instant createdAt;