From 585db4056acda24caeaceb970cad691c8f1842d6 Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Thu, 8 Jul 2021 16:51:17 -0400 Subject: [PATCH] fix following request not refreshing (untested) --- .../awais/instagrabber/adapters/NotificationsAdapter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/adapters/NotificationsAdapter.java b/app/src/main/java/awais/instagrabber/adapters/NotificationsAdapter.java index 9a9748e2..55fd2b19 100644 --- a/app/src/main/java/awais/instagrabber/adapters/NotificationsAdapter.java +++ b/app/src/main/java/awais/instagrabber/adapters/NotificationsAdapter.java @@ -24,12 +24,12 @@ public final class NotificationsAdapter extends ListAdapter DIFF_CALLBACK = new DiffUtil.ItemCallback() { @Override public boolean areItemsTheSame(final Notification oldItem, final Notification newItem) { - return oldItem != null && newItem != null && oldItem.getPk().equals(newItem.getPk()); + return oldItem.getPk().equals(newItem.getPk()); } @Override public boolean areContentsTheSame(@NonNull final Notification oldItem, @NonNull final Notification newItem) { - return oldItem.getPk().equals(newItem.getPk()); + return oldItem.getPk().equals(newItem.getPk()) && oldItem.getType() == newItem.getType(); } };