From d2f2bfd8d35a6ef366bb1e042f70efdd659d8ae7 Mon Sep 17 00:00:00 2001 From: Kasun Date: Wed, 1 May 2019 09:57:54 +0530 Subject: [PATCH] correctly unmute accounts --- .../mastodon/activities/ShowAccountActivity.java | 12 +++++++++--- app/src/main/res/values/strings.xml | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/activities/ShowAccountActivity.java b/app/src/main/java/fr/gouv/etalab/mastodon/activities/ShowAccountActivity.java index f3a4b0191..1b5bc28ef 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/activities/ShowAccountActivity.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/activities/ShowAccountActivity.java @@ -1211,9 +1211,15 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt startActivity(intent); return true; case R.id.action_mute: - builderInner = new AlertDialog.Builder(ShowAccountActivity.this, style); - builderInner.setTitle(stringArrayConf[0]); - doActionAccount = API.StatusAction.MUTE; + if (relationship.isMuting()) { + builderInner = new AlertDialog.Builder(ShowAccountActivity.this, style); + builderInner.setTitle(stringArrayConf[4]); + doActionAccount = API.StatusAction.UNMUTE; + } else { + builderInner = new AlertDialog.Builder(ShowAccountActivity.this, style); + builderInner.setTitle(stringArrayConf[0]); + doActionAccount = API.StatusAction.MUTE; + } break; case R.id.action_block: builderInner = new AlertDialog.Builder(ShowAccountActivity.this, style); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2db5d17b7..ee2f2f50c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -132,6 +132,7 @@ Block this account? Report this toot? Block this domain? + Unmute this account?