From 0d7fd67d57abc3a63264b9821fac4bffc12763af Mon Sep 17 00:00:00 2001 From: Chumva Date: Wed, 3 Oct 2018 17:43:04 +0300 Subject: [PATCH] Remove unnecessary changes --- .../src/net/osmand/telegram/helpers/TelegramHelper.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt b/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt index 22ae360f45..d3a6216fe8 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt @@ -99,7 +99,6 @@ class TelegramHelper private constructor() { private var haveAuthorization = false private val defaultHandler = DefaultHandler() - private val updatesHandler = UpdatesHandler() private val liveLocationMessageUpdatesHandler = LiveLocationMessageUpdatesHandler() private var updateLiveMessagesExecutor: ScheduledExecutorService? = null @@ -298,7 +297,7 @@ class TelegramHelper private constructor() { fun init(): Boolean { return if (libraryLoaded) { // create client - client = Client.create(updatesHandler, null, null) + client = Client.create(UpdatesHandler(), null, null) true } else { false @@ -615,7 +614,7 @@ class TelegramHelper private constructor() { if (msgId != null && msgId != 0L) { val array = LongArray(1) array[0] = msgId - client?.send(TdApi.DeleteMessages(chatId, array, true), updatesHandler) + client?.send(TdApi.DeleteMessages(chatId, array, true), UpdatesHandler()) } needRefreshActiveLiveLocationMessages = true } @@ -659,7 +658,7 @@ class TelegramHelper private constructor() { chatLivePeriods.forEach { (chatId, livePeriod) -> synchronized(pausedLiveMessages) { if (pausedLiveMessages.contains(chatId)) { - return + return@forEach } } val content = TdApi.InputMessageLocation(location, livePeriod.toInt())