adding a null check at text fragment

This commit is contained in:
tibbi 2022-03-08 18:51:33 +01:00
parent c1e664d9bb
commit 556b4aceca

View File

@ -210,7 +210,7 @@ class TextFragment : NoteFragment() {
}
}
fun hasUnsavedChanges() = getCurrentNoteViewText() != note!!.getNoteStoredValue(requireContext())
fun hasUnsavedChanges() = note != null && getCurrentNoteViewText() != note!!.getNoteStoredValue(requireContext())
fun focusEditText() {
view.text_note_view.requestFocus()