refactor(mute-conversations-toggle): remove unused method

This commit is contained in:
LucasGGamerM 2023-09-19 13:20:38 -03:00
parent 22bf8840d5
commit 24abf9d317
1 changed files with 0 additions and 32 deletions

View File

@ -137,36 +137,4 @@ public class StatusInteractionController{
status.bookmarked=bookmarked;
if (updateCounters) E.post(new StatusCountersUpdatedEvent(status));
}
public void setMuted(Status status, boolean muted, Consumer<Status> cb){
if(!Looper.getMainLooper().isCurrentThread())
throw new IllegalStateException("Can only be called from main thread");
SetStatusMuted current=runningMuteRequests.remove(status.id);
if(current!=null){
current.cancel();
}
SetStatusMuted req=(SetStatusMuted) new SetStatusMuted(status.id, muted)
.setCallback(new Callback<>(){
@Override
public void onSuccess(Status result){
runningMuteRequests.remove(status.id);
cb.accept(result);
if (updateCounters) E.post(new StatusCountersUpdatedEvent(result));
}
@Override
public void onError(ErrorResponse error){
runningMuteRequests.remove(status.id);
error.showToast(MastodonApp.context);
status.muted=!muted;
cb.accept(status);
if (updateCounters) E.post(new StatusCountersUpdatedEvent(status));
}
})
.exec(accountID);
runningMuteRequests.put(status.id, req);
status.muted=muted;
if (updateCounters) E.post(new StatusCountersUpdatedEvent(status));
}
}