mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-02-08 23:48:42 +01:00
fix a crash at placing a widget before launching the app once
This commit is contained in:
parent
7fc41e4564
commit
fa947fffe5
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user