From e3b79097d4afc2d2dce59af5b7b4a829d9ac80bb Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Thu, 18 Feb 2021 19:26:14 +0100 Subject: [PATCH] remove redundant options from account toolbar (#2075) --- .../keylesspalace/tusky/AccountActivity.kt | 19 +------------------ app/src/main/res/menu/account_toolbar.xml | 8 -------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/AccountActivity.kt b/app/src/main/java/com/keylesspalace/tusky/AccountActivity.kt index 99d135ed..ec3334e1 100644 --- a/app/src/main/java/com/keylesspalace/tusky/AccountActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/AccountActivity.kt @@ -661,14 +661,6 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidI menuInflater.inflate(R.menu.account_toolbar, menu) if (!viewModel.isSelf) { - val follow = menu.findItem(R.id.action_follow) - follow.title = if (followState == FollowState.NOT_FOLLOWING) { - getString(R.string.action_follow) - } else { - getString(R.string.action_unfollow) - } - - follow.isVisible = followState != FollowState.REQUESTED val block = menu.findItem(R.id.action_block) block.title = if (blocking) { @@ -712,8 +704,7 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidI } } else { - // It shouldn't be possible to block, follow, mute or report yourself. - menu.removeItem(R.id.action_follow) + // It shouldn't be possible to block, mute or report yourself. menu.removeItem(R.id.action_block) menu.removeItem(R.id.action_mute) menu.removeItem(R.id.action_mute_domain) @@ -805,10 +796,6 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidI override fun onOptionsItemSelected(item: MenuItem): Boolean { when (item.itemId) { - R.id.action_mention -> { - mention() - return true - } R.id.action_open_in_web -> { // If the account isn't loaded yet, eat the input. if (loadedAccount != null) { @@ -816,10 +803,6 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidI } return true } - R.id.action_follow -> { - viewModel.changeFollowState() - return true - } R.id.action_block -> { toggleBlock() return true diff --git a/app/src/main/res/menu/account_toolbar.xml b/app/src/main/res/menu/account_toolbar.xml index ee881122..d25bcdc1 100644 --- a/app/src/main/res/menu/account_toolbar.xml +++ b/app/src/main/res/menu/account_toolbar.xml @@ -2,18 +2,10 @@ - - - -