Fixed that listeners get called off UI thread
This commit is contained in:
parent
b82d986da2
commit
5f35cf7b23
|
@ -43,7 +43,9 @@ open class CurrentActivityTracker {
|
|||
nextActivitySetListeners.clear()
|
||||
|
||||
Timer().schedule(500) { // wait some time till activity is initialized
|
||||
listenersCopy.forEach { it(activity) }
|
||||
activity.runOnUiThread {
|
||||
listenersCopy.forEach { it(activity) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue