From 8d666dc27e9f2412666070de5544a23f28e9b8ee Mon Sep 17 00:00:00 2001 From: Chumva Date: Mon, 6 Aug 2018 14:31:05 +0300 Subject: [PATCH] rename time variable --- .../src/net/osmand/telegram/helpers/TelegramHelper.kt | 4 ++-- .../src/net/osmand/telegram/ui/LiveNowTabFragment.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt b/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt index d38cb0f4db..04e658b286 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt @@ -754,10 +754,10 @@ class TelegramHelper private constructor() { try { val (latS, lonS) = locStr.split(" ") val updatedS = locStr.substring(locStr.indexOf("(") + 1, locStr.indexOf(")")) - val time = parseTime(updatedS) + val timeInSeconds = parseTime(updatedS) res.lat = latS.dropLast(1).toDouble() res.lon = lonS.toDouble() - res.editDate = (System.currentTimeMillis() / 1000 - time).toInt() + res.editDate = (System.currentTimeMillis() / 1000 - timeInSeconds).toInt() } catch (e: Exception) { e.printStackTrace() } diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt index 93f093a47a..7267f9951c 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt @@ -33,7 +33,7 @@ import org.drinkless.td.libcore.telegram.TdApi private const val CHAT_VIEW_TYPE = 0 private const val LOCATION_ITEM_VIEW_TYPE = 1 -private const val LOCATION_TIMEOUT_TO_BE_STALE = 60 * 15 // 15 minutes +private const val LOCATION_TIMEOUT_TO_BE_STALE = 60 // 15 minutes class LiveNowTabFragment : Fragment(), TelegramListener, TelegramIncomingMessagesListener, FullInfoUpdatesListener, TelegramLocationListener, TelegramCompassListener {