don't remove gap when removing status

re: sk22#898
This commit is contained in:
sk 2023-10-26 18:32:46 +02:00
parent c8f633ae3b
commit e8c9253a76
2 changed files with 3 additions and 1 deletions

View File

@ -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});
});
}

View File

@ -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<Status>
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;
}