mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-06-05 17:00:23 +02:00
fix a crash at placing a widget before launching the app once
This commit is contained in:
@ -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)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user