From 583ab5deba8c4723d707fa3afb6b67c160ac17cd Mon Sep 17 00:00:00 2001 From: max-klaus Date: Thu, 14 Jan 2021 17:27:47 +0300 Subject: [PATCH] Fix concurrency in tracker --- OsmAnd-telegram/src/net/osmand/telegram/ui/MainActivity.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/MainActivity.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/MainActivity.kt index 38535ad886..4026309f63 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/MainActivity.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/MainActivity.kt @@ -447,8 +447,10 @@ class MainActivity : AppCompatActivity(), TelegramListener, ActionButtonsListene } private fun runOnUi(action: (() -> Unit)) { - if (!paused) { - runOnUiThread(action) + runOnUiThread { + if (!paused) { + action() + } } }