diff --git a/mastodon/src/main/java/org/joinmastodon/android/api/CacheController.java b/mastodon/src/main/java/org/joinmastodon/android/api/CacheController.java index 12725fe0c..6fd6478da 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/api/CacheController.java +++ b/mastodon/src/main/java/org/joinmastodon/android/api/CacheController.java @@ -273,6 +273,7 @@ public class CacheController{ public void deleteStatus(String id){ runOnDbThread((db)->{ + // TODO: set previous status's hasGapAfter flag if the deleted status hasGapAfter db.delete("home_timeline", "`id`=?", new String[]{id}); }); } diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/StatusListFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/StatusListFragment.java index 2175c9abe..7bb00c27f 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/StatusListFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/StatusListFragment.java @@ -25,6 +25,7 @@ import org.joinmastodon.android.model.Status; import org.joinmastodon.android.ui.displayitems.EmojiReactionsStatusDisplayItem; import org.joinmastodon.android.ui.displayitems.ExtendedFooterStatusDisplayItem; import org.joinmastodon.android.ui.displayitems.FooterStatusDisplayItem; +import org.joinmastodon.android.ui.displayitems.GapStatusDisplayItem; import org.joinmastodon.android.ui.displayitems.StatusDisplayItem; import org.joinmastodon.android.ui.displayitems.TextStatusDisplayItem; import org.parceler.Parcels; @@ -216,7 +217,7 @@ public abstract class StatusListFragment extends BaseStatusListFragment StatusDisplayItem item=displayItems.get(i); // we found a status that the to-be-removed status replies to! // storing indices to maybe update its display items - if(item.parentID.equals(status.inReplyToId)){ + if(item.parentID.equals(status.inReplyToId) && !(item instanceof GapStatusDisplayItem)){ if(ancestorFirstIndex==-1) ancestorFirstIndex=i; ancestorLastIndex=i; }