Update profile menu (AND-34)

This commit is contained in:
Grishka 2023-06-05 04:32:18 +03:00
parent a705512dc5
commit 02ddad22e7
4 changed files with 8 additions and 6 deletions

View File

@ -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())

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/share" android:title="@string/share_user"/>
<!-- TODO add to list -->
<item android:id="@+id/mute" android:title="@string/mute_user"/>
<item android:id="@+id/block" android:title="@string/block_user"/>
<item android:id="@+id/report" android:title="@string/report_user"/>

View File

@ -3,4 +3,5 @@
<item android:id="@+id/bookmarks" android:title="@string/bookmarks" android:icon="@drawable/ic_bookmark_24px" android:showAsAction="always"/>
<item android:id="@+id/favorites" android:title="@string/your_favorites" android:icon="@drawable/ic_star_24px" android:showAsAction="always"/>
<item android:id="@+id/share" android:title="@string/share_user" android:icon="@drawable/ic_share_24px" android:showAsAction="always"/>
<!-- TODO add to list -->
</menu>

View File

@ -54,7 +54,7 @@
<string name="button_following">Following</string>
<string name="edit_profile">Edit Profile</string>
<string name="mention_user">Mention %s</string>
<string name="share_user">Share %s</string>
<string name="share_user">Share profile</string>
<string name="mute_user">Mute %s</string>
<string name="unmute_user">Unmute %s</string>
<string name="block_user">Block %s</string>