Fixed that listeners get called off UI thread
This commit is contained in:
parent
b82d986da2
commit
5f35cf7b23
1 changed files with 3 additions and 1 deletions
|
@ -43,9 +43,11 @@ open class CurrentActivityTracker {
|
||||||
nextActivitySetListeners.clear()
|
nextActivitySetListeners.clear()
|
||||||
|
|
||||||
Timer().schedule(500) { // wait some time till activity is initialized
|
Timer().schedule(500) { // wait some time till activity is initialized
|
||||||
|
activity.runOnUiThread {
|
||||||
listenersCopy.forEach { it(activity) }
|
listenersCopy.forEach { it(activity) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue