From 7eead1e879ef728e89853db83b949c54dcdffaca Mon Sep 17 00:00:00 2001 From: Alex Sytnyk Date: Mon, 6 Aug 2018 18:38:28 +0300 Subject: [PATCH] Fix logging in OsmAnd-Telegram --- .../src/net/osmand/telegram/ui/MainActivity.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/MainActivity.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/MainActivity.kt index 42df754822..245f570ebc 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/MainActivity.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/MainActivity.kt @@ -118,10 +118,6 @@ class MainActivity : AppCompatActivity(), TelegramListener, ActionButtonsListene } } }) - telegramHelper.listener = this - if (!telegramHelper.isInit()) { - telegramHelper.init() - } if (osmandAidlHelper.isOsmandBound() && !osmandAidlHelper.isOsmandConnected()) { osmandAidlHelper.connectOsmand() @@ -143,6 +139,11 @@ class MainActivity : AppCompatActivity(), TelegramListener, ActionButtonsListene super.onResume() paused = false + telegramHelper.listener = this + if (!telegramHelper.isInit()) { + telegramHelper.init() + } + app.locationProvider.checkIfLastKnownLocationIsValid() if (AndroidUtils.isLocationPermissionAvailable(this)) {