Merge pull request #8208 from osmandapp/Suggested_List

save shareInfo to suggested when sharing time expire
This commit is contained in:
max-klaus 2020-01-10 13:07:59 +03:00 committed by GitHub
commit 35cf7fae17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 =