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

@ -445,12 +445,12 @@ class MainActivity : SimpleActivity() {
exportNoteValueToFile(exportPath, currentNoteText, true) {
if (syncFile) {
mCurrentNote.path = exportPath
dbHelper.updateNotePath(mCurrentNote)
if (mCurrentNote.getNoteStoredValue() == currentNoteText) {
mCurrentNote.value = ""
dbHelper.updateNoteValue(mCurrentNote)
}
dbHelper.updateNote(mCurrentNote)
}
}
}