diff --git a/OsmAnd-telegram/src/net/osmand/telegram/helpers/ShareLocationHelper.kt b/OsmAnd-telegram/src/net/osmand/telegram/helpers/ShareLocationHelper.kt index 3c90c2a636..7fbb026399 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/helpers/ShareLocationHelper.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/helpers/ShareLocationHelper.kt @@ -89,7 +89,10 @@ class ShareLocationHelper(private val app: TelegramApplication) { app.settings.getChatsShareInfo().forEach { (chatId, shareInfo) -> val currentTime = System.currentTimeMillis() / 1000 when { - shareInfo.getChatLiveMessageExpireTime() <= 0 -> app.settings.shareLocationToChat(chatId, false) + shareInfo.getChatLiveMessageExpireTime() <= 0 -> { + app.settings.shareLocationToChat(chatId, false) + app.settings.addTimePeriodToLastItem(shareInfo.chatId, shareInfo.livePeriod) + } currentTime > shareInfo.currentMessageLimit -> { shareInfo.apply { val newLivePeriod =