fix a crash at placing a widget before launching the app once

This commit is contained in:
tibbi 2018-11-16 23:39:25 +01:00
parent 7fc41e4564
commit fa947fffe5
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ class NotesHelper(val activity: Activity) {
fun getNotes(callback: (notes: ArrayList<Note>) -> Unit) { fun getNotes(callback: (notes: ArrayList<Note>) -> Unit) {
Thread { Thread {
// make sure the initial note has enough time to be precreated // make sure the initial note has enough time to be precreated
if (activity.config.appRunCount == 1) { if (activity.config.appRunCount <= 1) {
activity.notesDB.getNotes() activity.notesDB.getNotes()
Thread.sleep(200) Thread.sleep(200)
} }