From 886491767662d2f779dc130f2ac99fd3ca717755 Mon Sep 17 00:00:00 2001 From: Chumva Date: Thu, 18 Jul 2019 12:32:43 +0300 Subject: [PATCH] Fix logout disabling services --- OsmAnd-telegram/src/net/osmand/telegram/ui/MainActivity.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/MainActivity.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/MainActivity.kt index 8126832651..38a5fe631f 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/MainActivity.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/MainActivity.kt @@ -356,7 +356,9 @@ class MainActivity : AppCompatActivity(), TelegramListener, ActionButtonsListene } fun logoutTelegram(silent: Boolean = false) { - if (telegramHelper.getTelegramAuthorizationState() == TelegramHelper.TelegramAuthorizationState.READY) { + if (telegramHelper.getTelegramAuthorizationState() == TelegramAuthorizationState.READY) { + app.stopMonitoring() + app.stopSharingLocation() if (app.isInternetConnectionAvailable) { app.locationMessages.clearBufferedMessages() settings.clear()