File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
app/src/main/kotlin/com/simplemobiletools/notes/pro/helpers Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,20 @@ package com.simplemobiletools.notes.pro.helpers
22
33import android.app.Activity
44import com.simplemobiletools.notes.pro.R
5+ import com.simplemobiletools.notes.pro.extensions.config
56import com.simplemobiletools.notes.pro.extensions.notesDB
67import com.simplemobiletools.notes.pro.models.Note
78import java.io.File
89
910class NotesHelper (val activity : Activity ) {
1011 fun getNotes (callback : (notes: ArrayList <Note >) -> Unit ) {
1112 Thread {
13+ // make sure the initial note has enough time to be precreated
14+ if (activity.config.appRunCount == 1 ) {
15+ activity.notesDB.getNotes()
16+ Thread .sleep(200 )
17+ }
18+
1219 val notes = activity.notesDB.getNotes() as ArrayList <Note >
1320 val notesToDelete = ArrayList <Note >(notes.size)
1421 notes.forEach {
You can’t perform that action at this time.
0 commit comments