hopefully unfuck removing statuses and reblogs

This commit is contained in:
sk
2023-10-19 21:42:17 +02:00
parent 95fa547f15
commit 387b31193f
4 changed files with 65 additions and 40 deletions

View File

@@ -89,7 +89,7 @@ public abstract class StatusDisplayItem{
}
@NonNull
public String getContentID(){
public String getContentStatusID(){
if(parentFragment instanceof StatusListFragment slf){
Status s=slf.getContentStatusByID(parentID);
return s!=null ? s.id : parentID;

View File

@@ -638,11 +638,8 @@ public class UiUtils {
@Override
public void onSuccess(Status result) {
resultCallback.accept(result);
CacheController cache=AccountSessionManager.get(accountID).getCacheController();
cache.deleteStatus(s.id);
E.post(new StatusDeletedEvent(s.id, accountID));
if(status!=s){
cache.deleteStatus(status.id);
E.post(new StatusDeletedEvent(status.id, accountID));
}
}