diff --git a/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt b/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt index e787c6036c..f8207fe83f 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt @@ -558,7 +558,7 @@ class TelegramHelper private constructor() { } fun stopSendingLiveLocationMessages() { - chatLiveMessages.forEach { chatId, _ -> + chatLiveMessages.forEach { (chatId, _ )-> stopSendingLiveLocationToChat(chatId) } } @@ -593,7 +593,7 @@ class TelegramHelper private constructor() { private fun sendLiveLocationImpl(chatLivePeriods: Map, latitude: Double, longitude: Double) { val location = TdApi.Location(latitude, longitude) - chatLivePeriods.forEach { chatId, livePeriod -> + chatLivePeriods.forEach { (chatId, livePeriod) -> val content = TdApi.InputMessageLocation(location, livePeriod.toInt()) val msgId = chatLiveMessages[chatId]?.id if (msgId != null) { diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/SetTimeDialogFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/SetTimeDialogFragment.kt index 335a62a924..0e97430ae3 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/SetTimeDialogFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/SetTimeDialogFragment.kt @@ -100,7 +100,7 @@ class SetTimeDialogFragment : DialogFragment(), TelegramLocationListener, Telegr if (!AndroidUtils.isLocationPermissionAvailable(view.context)) { AndroidUtils.requestLocationPermission(activity!!) } else { - chatLivePeriods.forEach { chatId, livePeriod -> + chatLivePeriods.forEach { (chatId, livePeriod) -> settings.shareLocationToChat(chatId, true, livePeriod) } app.shareLocationHelper.startSharingLocation()