From 02ddad22e75d6622c46b986eae910e4d929cc64f Mon Sep 17 00:00:00 2001 From: Grishka Date: Mon, 5 Jun 2023 04:32:18 +0300 Subject: [PATCH] Update profile menu (AND-34) --- .../android/fragments/ProfileFragment.java | 10 +++++----- mastodon/src/main/res/menu/profile.xml | 1 + mastodon/src/main/res/menu/profile_own.xml | 1 + mastodon/src/main/res/values/strings.xml | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java index efc59ce5..f41b4658 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java @@ -559,15 +559,15 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList if(relationship==null && !isOwnProfile) return; inflater.inflate(isOwnProfile ? R.menu.profile_own : R.menu.profile, menu); - menu.findItem(R.id.share).setTitle(getString(R.string.share_user, account.getDisplayUsername())); + menu.findItem(R.id.share).setTitle(R.string.share_user); if(isOwnProfile) return; - menu.findItem(R.id.mute).setTitle(getString(relationship.muting ? R.string.unmute_user : R.string.mute_user, account.getDisplayUsername())); - menu.findItem(R.id.block).setTitle(getString(relationship.blocking ? R.string.unblock_user : R.string.block_user, account.getDisplayUsername())); - menu.findItem(R.id.report).setTitle(getString(R.string.report_user, account.getDisplayUsername())); + menu.findItem(R.id.mute).setTitle(getString(relationship.muting ? R.string.unmute_user : R.string.mute_user, account.displayName)); + menu.findItem(R.id.block).setTitle(getString(relationship.blocking ? R.string.unblock_user : R.string.block_user, account.displayName)); + menu.findItem(R.id.report).setTitle(getString(R.string.report_user, account.displayName)); if(relationship.following) - menu.findItem(R.id.hide_boosts).setTitle(getString(relationship.showingReblogs ? R.string.hide_boosts_from_user : R.string.show_boosts_from_user, account.getDisplayUsername())); + menu.findItem(R.id.hide_boosts).setTitle(getString(relationship.showingReblogs ? R.string.hide_boosts_from_user : R.string.show_boosts_from_user, account.displayName)); else menu.findItem(R.id.hide_boosts).setVisible(false); if(!account.isLocal()) diff --git a/mastodon/src/main/res/menu/profile.xml b/mastodon/src/main/res/menu/profile.xml index e140a533..5e6aef95 100644 --- a/mastodon/src/main/res/menu/profile.xml +++ b/mastodon/src/main/res/menu/profile.xml @@ -1,6 +1,7 @@ + diff --git a/mastodon/src/main/res/menu/profile_own.xml b/mastodon/src/main/res/menu/profile_own.xml index ffacd852..309ff890 100644 --- a/mastodon/src/main/res/menu/profile_own.xml +++ b/mastodon/src/main/res/menu/profile_own.xml @@ -3,4 +3,5 @@ + \ No newline at end of file diff --git a/mastodon/src/main/res/values/strings.xml b/mastodon/src/main/res/values/strings.xml index 52985572..3e021a08 100644 --- a/mastodon/src/main/res/values/strings.xml +++ b/mastodon/src/main/res/values/strings.xml @@ -54,7 +54,7 @@ Following Edit Profile Mention %s - Share %s + Share profile Mute %s Unmute %s Block %s