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 bf1d583585..5deac06a70 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java @@ -902,8 +902,6 @@ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){ }else{ blockDomain.setVisible(false); } - menu.findItem(R.id.edit_note).setTitle(noteWrap.getVisibility()==View.GONE && (relationship.note==null || relationship.note.isEmpty()) - ? R.string.sk_add_note : R.string.sk_delete_note); } @Override @@ -985,26 +983,6 @@ public void onError(ErrorResponse error){ }else if(id==R.id.save){ if(isInEditMode) saveAndExitEditMode(); - }else if(id==R.id.edit_note){ - if(noteWrap.getVisibility()==View.GONE){ - showPrivateNote(); - UiUtils.beginLayoutTransition(scrollableContent); - noteEdit.requestFocus(); - noteEdit.postDelayed(()->{ - InputMethodManager imm=getActivity().getSystemService(InputMethodManager.class); - imm.showSoftInput(noteEdit, 0); - }, 100); - }else if(relationship.note.isEmpty()){ - hidePrivateNote(); - UiUtils.beginLayoutTransition(scrollableContent); - }else{ - new M3AlertDialogBuilder(getActivity()) - .setMessage(getContext().getString(R.string.sk_private_note_confirm_delete, account.getDisplayUsername())) - .setPositiveButton(R.string.delete, (dlg, btn)->savePrivateNote(null)) - .setNegativeButton(R.string.cancel, null) - .show(); - } - invalidateOptionsMenu(); } return true; } @@ -1030,8 +1008,7 @@ public void onError(ErrorResponse error){ private void updateRelationship(){ if(getActivity()==null) return; - if(relationship.note!=null && !relationship.note.isEmpty()) showPrivateNote(); - else hidePrivateNote(); + showPrivateNote(); invalidateOptionsMenu(); actionButton.setVisibility(View.VISIBLE); notifyButton.setVisibility(relationship.following ? View.VISIBLE : View.GONE); diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/viewholders/AccountViewHolder.java b/mastodon/src/main/java/org/joinmastodon/android/ui/viewholders/AccountViewHolder.java index caa89f7973..efd2380718 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/viewholders/AccountViewHolder.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/viewholders/AccountViewHolder.java @@ -217,7 +217,6 @@ public boolean onLongClick(float x, float y){ Menu menu=contextMenu.getMenu(); Account account=item.account; - menu.findItem(R.id.edit_note).setVisible(false); menu.findItem(R.id.manage_user_lists).setTitle(fragment.getString(R.string.sk_lists_with_user, account.getShortUsername())); MenuItem mute=menu.findItem(R.id.mute); mute.setTitle(fragment.getString(relationship.muting ? R.string.unmute_user : R.string.mute_user, account.getShortUsername())); diff --git a/mastodon/src/main/res/menu/profile.xml b/mastodon/src/main/res/menu/profile.xml index 6d93f8a606..aaaf7cae8c 100644 --- a/mastodon/src/main/res/menu/profile.xml +++ b/mastodon/src/main/res/menu/profile.xml @@ -1,9 +1,6 @@ - - - @@ -12,7 +9,7 @@ - +