Fix concurrency in tracker
This commit is contained in:
parent
1a82db982f
commit
583ab5deba
1 changed files with 4 additions and 2 deletions
|
@ -447,8 +447,10 @@ class MainActivity : AppCompatActivity(), TelegramListener, ActionButtonsListene
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun runOnUi(action: (() -> Unit)) {
|
private fun runOnUi(action: (() -> Unit)) {
|
||||||
if (!paused) {
|
runOnUiThread {
|
||||||
runOnUiThread(action)
|
if (!paused) {
|
||||||
|
action()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue