removing a redundant variable

This commit is contained in:
tibbi 2019-03-08 23:10:28 +01:00
parent aa25f23c38
commit 53340c9972

View File

@ -479,14 +479,13 @@ class MainActivity : SimpleActivity() {
RadioGroupDialog(this, items) { RadioGroupDialog(this, items) {
val syncFile = it as Int == EXPORT_FILE_SYNC val syncFile = it as Int == EXPORT_FILE_SYNC
val storedValue = mCurrentNote.getNoteStoredValue() ?: ""
tryExportNoteValueToFile(exportPath, textToExport, true) { tryExportNoteValueToFile(exportPath, textToExport, true) {
if (syncFile) { if (syncFile) {
mCurrentNote.path = exportPath mCurrentNote.path = exportPath
mCurrentNote.value = "" mCurrentNote.value = ""
} else { } else {
mCurrentNote.path = "" mCurrentNote.path = ""
mCurrentNote.value = storedValue mCurrentNote.value = textToExport
} }
NotesHelper(this).insertOrUpdateNote(mCurrentNote) NotesHelper(this).insertOrUpdateNote(mCurrentNote)