Skip to content

Commit

Permalink
feat(Timeline/Hashtag): show snackbar when unmuting
Browse files Browse the repository at this point in the history
Gives the user feedback in the form of a snackbar that the unmuting was
sucessful. This is already done for unmuting accounts.
  • Loading branch information
FineFindus committed Aug 25, 2024
1 parent b0f8cbb commit 1f06e4e
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.joinmastodon.android.model.Hashtag;
import org.joinmastodon.android.model.Status;
import org.joinmastodon.android.model.TimelineDefinition;
import org.joinmastodon.android.ui.Snackbar;
import org.joinmastodon.android.ui.sheets.MuteHashtagConfirmationSheet;
import org.joinmastodon.android.ui.text.SpacerSpan;
import org.joinmastodon.android.ui.utils.UiUtils;
Expand Down Expand Up @@ -131,13 +132,17 @@ public void onError(ErrorResponse error){
}).exec(accountID);
}).show();
}

private void unmuteHashtag() {
//safe to get, this only called if filter is present
new DeleteFilter(filter.get().id).setCallback(new Callback<>(){
@Override
public void onSuccess(Void result){
filter=Optional.empty();
updateMuteState(false);
new Snackbar.Builder(getContext())
.setText(getContext().getString(R.string.unmuted_user_x, '#'+hashtagName))
.show();
}

@Override
Expand Down

0 comments on commit 1f06e4e

Please sign in to comment.