From b4219bcaa08c5869dadaa9d35b1d267990e48812 Mon Sep 17 00:00:00 2001 From: Grishka Date: Thu, 5 May 2022 06:05:50 +0300 Subject: [PATCH] Crash fix --- .../joinmastodon/android/fragments/HomeTimelineFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeTimelineFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeTimelineFragment.java index 20fac476..d93a2602 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeTimelineFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeTimelineFragment.java @@ -161,7 +161,7 @@ public class HomeTimelineFragment extends StatusListFragment{ return; Status last=result.get(result.size()-1); List toAdd; - if(last.id.equals(data.get(0).id)){ // This part intersects with the existing one + if(!data.isEmpty() && last.id.equals(data.get(0).id)){ // This part intersects with the existing one toAdd=result.subList(0, result.size()-1); // Remove the already known last post }else{ result.get(result.size()-1).hasGapAfter=true;