use one shared function for updating note title, value, path

This commit is contained in:
tibbi
2018-11-07 12:58:35 +01:00
parent 2fc3d8cba9
commit f26ea25a1e
4 changed files with 12 additions and 24 deletions

View File

@ -179,7 +179,7 @@ class NoteFragment : androidx.fragment.app.Fragment() {
private fun saveNoteValue(note: Note) {
if (note.path.isEmpty()) {
db.updateNoteValue(note)
db.updateNote(note)
(activity as MainActivity).noteSavedSuccessfully(note.title)
} else {
val currentText = getCurrentNoteViewText()