feat(Timeline/Hashtag): show snackbar when unmuting

Gives the user feedback in the form of a snackbar that the unmuting was
sucessful. This is already done for unmuting accounts.
This commit is contained in:
FineFindus 2024-08-25 13:43:26 +02:00
parent b0f8cbb2e3
commit 1f06e4e8f3
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B
1 changed files with 5 additions and 0 deletions

View File

@ -34,6 +34,7 @@ import org.joinmastodon.android.model.FilterKeyword;
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;
@ -131,6 +132,7 @@ public class HashtagTimelineFragment extends PinnableStatusListFragment{
}).exec(accountID);
}).show();
}
private void unmuteHashtag() {
//safe to get, this only called if filter is present
new DeleteFilter(filter.get().id).setCallback(new Callback<>(){
@ -138,6 +140,9 @@ public class HashtagTimelineFragment extends PinnableStatusListFragment{
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