diff --git a/OsmAnd-telegram/src/net/osmand/telegram/helpers/LocationMessages.kt b/OsmAnd-telegram/src/net/osmand/telegram/helpers/LocationMessages.kt index 4a1f855c27..fa294cf1b4 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/helpers/LocationMessages.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/helpers/LocationMessages.kt @@ -332,21 +332,6 @@ class LocationMessages(val app: TelegramApplication) { return res } - internal fun removeOldBufferedMessages(list: List, bufferTime: Long): List { - log.info("removeOldBufferedMessages" ) - val currentTime = System.currentTimeMillis() - val cleanedList = arrayListOf() - list.forEach { message -> - if (currentTime - message.time > bufferTime) { - removeBufferedMessage(message) - log.debug("remove old buffered message: $message" ) - } else { - cleanedList.add(message) - } - } - return cleanedList - } - internal fun getLastMessages(): MutableList { val res = arrayListOf() readableDatabase?.rawQuery("$TIMELINE_TABLE_SELECT_LAST_LOCATIONS GROUP BY $COL_USER_ID, $COL_CHAT_ID, $COL_DEVICE_NAME, $COL_TYPE", null)?.apply {