Fixed that listeners get called off UI thread
This commit is contained in:
parent
b82d986da2
commit
5f35cf7b23
|
@ -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…
Reference in New Issue