From 1f06e4e8f3288dd1b327612f1243076f94ecb8bb Mon Sep 17 00:00:00 2001 From: FineFindus Date: Sun, 25 Aug 2024 13:43:26 +0200 Subject: [PATCH] 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. --- .../android/fragments/HashtagTimelineFragment.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/HashtagTimelineFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/HashtagTimelineFragment.java index 9cb6f75fbb..b2392c0fad 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/HashtagTimelineFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/HashtagTimelineFragment.java @@ -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; @@ -131,6 +132,7 @@ 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<>(){ @@ -138,6 +140,9 @@ private void unmuteHashtag() { 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