From 648b62b22fdde55ca52bb8c54b2e744c5013752e Mon Sep 17 00:00:00 2001 From: max-klaus Date: Mon, 27 Jan 2020 00:06:20 +0300 Subject: [PATCH] Fix negative buffer --- OsmAnd-telegram/src/net/osmand/telegram/TelegramSettings.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/TelegramSettings.kt b/OsmAnd-telegram/src/net/osmand/telegram/TelegramSettings.kt index 61bdd8ef86..cb7f9ae6a8 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/TelegramSettings.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/TelegramSettings.kt @@ -1450,7 +1450,13 @@ class TelegramSettings(private val app: TelegramApplication) { } var sentMessages = 0 var pendingTdLibText = 0 + set(value) { + field = max(0, value) + } var pendingTdLibMap = 0 + set(value) { + field = max(0, value) + } var pendingTextMessage = false var pendingMapMessage = false var shouldSendViaBotTextMessage = false