Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
don't remove gap when removing status
Browse files Browse the repository at this point in the history
re: #898
  • Loading branch information
sk22 committed Oct 26, 2023
1 parent c8f633a commit e8c9253
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ public void putRecentSearch(SearchResult result){

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});
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
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;
Expand Down Expand Up @@ -216,7 +217,7 @@ protected void removeStatus(Status 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;
}
Expand Down

0 comments on commit e8c9253

Please sign in to comment.