diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/NotificationsFragment.java b/app/src/main/java/com/keylesspalace/tusky/fragment/NotificationsFragment.java index 7d5627339..b888d8cbf 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/NotificationsFragment.java +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/NotificationsFragment.java @@ -83,6 +83,7 @@ import com.keylesspalace.tusky.viewdata.StatusViewData; import java.io.IOException; import java.util.ArrayList; +import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.List; @@ -1168,9 +1169,7 @@ public class NotificationsFragment extends SFragment implements public Object getChangePayload(@NonNull NotificationViewData oldItem, @NonNull NotificationViewData newItem) { if (oldItem.deepEquals(newItem)) { //If items are equal - update timestamp only - List payload = new ArrayList<>(); - payload.add(StatusBaseViewHolder.Key.KEY_CREATED); - return payload; + return Collections.singletonList(StatusBaseViewHolder.Key.KEY_CREATED); } else // If items are different - update a whole view holder return null; diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/TimelineFragment.java b/app/src/main/java/com/keylesspalace/tusky/fragment/TimelineFragment.java index 6dd0ea46e..3bf38f691 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/TimelineFragment.java +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/TimelineFragment.java @@ -1357,9 +1357,7 @@ public class TimelineFragment extends SFragment implements public Object getChangePayload(@NonNull StatusViewData oldItem, @NonNull StatusViewData newItem) { if (oldItem.deepEquals(newItem)) { //If items are equal - update timestamp only - List payload = new ArrayList<>(); - payload.add(StatusBaseViewHolder.Key.KEY_CREATED); - return payload; + return Collections.singletonList(StatusBaseViewHolder.Key.KEY_CREATED); } else // If items are different - update a whole view holder return null;