Fixed that listeners get called off UI thread

This commit is contained in:
dankito 2020-10-06 16:56:57 +02:00
parent b82d986da2
commit 5f35cf7b23
1 changed files with 3 additions and 1 deletions

View File

@ -43,9 +43,11 @@ open class CurrentActivityTracker {
nextActivitySetListeners.clear()
Timer().schedule(500) { // wait some time till activity is initialized
activity.runOnUiThread {
listenersCopy.forEach { it(activity) }
}
}
}
}
}