adding a crashfix at the Plain Text notes

This commit is contained in:
tibbi
2020-05-28 21:58:58 +02:00
parent a9066ab343
commit d0dfab6855
2 changed files with 7 additions and 4 deletions

View File

@ -143,9 +143,11 @@ class TextFragment : NoteFragment() {
if (config.showKeyboard && isMenuVisible) {
onGlobalLayout {
requestFocus()
val inputManager = activity!!.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
inputManager.showSoftInput(this, InputMethodManager.SHOW_IMPLICIT)
if (activity?.isDestroyed == false) {
requestFocus()
val inputManager = activity!!.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
inputManager.showSoftInput(this, InputMethodManager.SHOW_IMPLICIT)
}
}
}