diff --git a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/util/CurrentActivityTracker.kt b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/util/CurrentActivityTracker.kt index a3e7136a..916a28d6 100644 --- a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/util/CurrentActivityTracker.kt +++ b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/util/CurrentActivityTracker.kt @@ -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) } + } } } }