fix #109, allow exporting all notes at once

This commit is contained in:
tibbi
2018-01-26 18:15:19 +01:00
parent 98a37986a9
commit be4d06f04c
7 changed files with 150 additions and 15 deletions

View File

@ -60,11 +60,13 @@ class NoteFragment : Fragment() {
fun getNotesView() = view.notes_view
fun saveText() {
if (note.path.isNotEmpty() && !File(note.path).exists())
if (note.path.isNotEmpty() && !File(note.path).exists()) {
return
}
if (context == null || activity == null)
if (context == null || activity == null) {
return
}
val newText = getCurrentNoteViewText()
val oldText = context!!.getNoteStoredValue(note)
@ -84,7 +86,7 @@ class NoteFragment : Fragment() {
mDb.updateNoteValue(note)
(activity as MainActivity).noteSavedSuccessfully(note.title)
} else {
(activity as MainActivity).exportNoteValueToFile(note.path, getCurrentNoteViewText())
(activity as MainActivity).exportNoteValueToFile(note.path, getCurrentNoteViewText(), true)
}
}