From 2efb79f6cbd3fdc6c4ca2f384560f1e1477f648f Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Sat, 23 Dec 2023 10:10:46 -0300 Subject: [PATCH] fix(profile-note): hide keyboard when edit note box goes away --- .../org/joinmastodon/android/fragments/ProfileFragment.java | 5 +++++ 1 file changed, 5 insertions(+) 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 1591781e60..5cc849e2a8 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java @@ -959,6 +959,11 @@ public void onError(ErrorResponse error){ }, 100); }else if(relationship.note.isEmpty()){ hidePrivateNote(); + noteEdit.clearFocus(); + noteEdit.postDelayed(()->{ + InputMethodManager imm=getActivity().getSystemService(InputMethodManager.class); + imm.hideSoftInputFromWindow(noteEdit.getWindowToken(), 0); + }, 100); UiUtils.beginLayoutTransition(scrollableContent); }else{ new M3AlertDialogBuilder(getActivity())