summaryrefslogtreecommitdiffstats
path: root/app/src/main/java/app/fedilab/android/viewmodel/mastodon/NotificationsVM.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/app/fedilab/android/viewmodel/mastodon/NotificationsVM.java')
-rw-r--r--app/src/main/java/app/fedilab/android/viewmodel/mastodon/NotificationsVM.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/NotificationsVM.java b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/NotificationsVM.java
index cb9d624c9..d7ee2dd4b 100644
--- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/NotificationsVM.java
+++ b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/NotificationsVM.java
@@ -74,7 +74,7 @@ public class NotificationsVM extends AndroidViewModel {
sortDesc(notificationList);
if (timelineParams.direction == FragmentMastodonTimeline.DIRECTION.REFRESH || timelineParams.direction == FragmentMastodonTimeline.DIRECTION.SCROLL_TOP || timelineParams.direction == FragmentMastodonTimeline.DIRECTION.FETCH_NEW) {
//When refreshing/scrolling to TOP, if last statuses fetched has a greater id from newest in cache, there is potential hole
- if (notificationList.get(notificationList.size() - 1).id.compareToIgnoreCase(timelineNotifications.get(0).id) > 0) {
+ if (!timelineNotifications.contains(notificationList.get(notificationList.size() - 1))) {
notificationList.get(notificationList.size() - 1).isFetchMore = true;
notificationList.get(notificationList.size() - 1).positionFetchMore = Notification.PositionFetchMore.TOP;
}