Skip to content

Commit 05ee03f

Browse files
committed
fix renaming notes exported to files
1 parent ad216cb commit 05ee03f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/main/kotlin/com/simplemobiletools/notes/pro/dialogs/RenameNoteDialog.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import com.simplemobiletools.commons.extensions.*
66
import com.simplemobiletools.notes.pro.R
77
import com.simplemobiletools.notes.pro.activities.SimpleActivity
88
import com.simplemobiletools.notes.pro.extensions.notesDB
9+
import com.simplemobiletools.notes.pro.helpers.NotesHelper
910
import com.simplemobiletools.notes.pro.models.Note
1011
import kotlinx.android.synthetic.main.dialog_new_note.view.*
1112
import java.io.File
@@ -61,8 +62,7 @@ class RenameNoteDialog(val activity: SimpleActivity, val note: Note, val callbac
6162
activity.renameFile(file.absolutePath, newFile.absolutePath) {
6263
if (it) {
6364
note.path = newFile.absolutePath
64-
activity.notesDB.insertOrUpdate(note)
65-
activity.runOnUiThread {
65+
NotesHelper(activity).insertOrUpdateNote(note) {
6666
dialog.dismiss()
6767
callback(note)
6868
}

0 commit comments

Comments
 (0)