From 6a8890a4be2be887ff37c940f03fd2e42ad322bb Mon Sep 17 00:00:00 2001 From: Alex Sytnyk Date: Wed, 27 Jun 2018 12:43:33 +0300 Subject: [PATCH] Fix "Live now" list --- .../src/net/osmand/telegram/helpers/TelegramHelper.kt | 2 +- .../src/net/osmand/telegram/ui/LiveNowTabFragment.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt b/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt index 9f15726fa4..682b0feb2c 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt @@ -358,7 +358,7 @@ class TelegramHelper private constructor() { if (chatId != null) { val chat = chats[chatId] if (chat == null || isChannel(chat)) { - return + continue } client?.send(TdApi.SearchChatRecentLocationMessages(chatId, CHAT_LIVE_USERS_LIMIT)) { obj -> when (obj.constructor) { diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt index afe038bfa4..f9cf173d5a 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt @@ -94,7 +94,7 @@ class LiveNowTabFragment : Fragment(), TelegramListener { for ((id, messages) in telegramHelper.getMessagesByChatIds()) { telegramHelper.getChat(id)?.let { chat -> res.add(chat) - if (chat.type !is TdApi.ChatTypePrivate && chat.type !is TdApi.ChatTypeSecret && messages.size > 1) { + if (chat.type is TdApi.ChatTypeBasicGroup || chat.type is TdApi.ChatTypeSupergroup) { messages.forEach { message -> telegramHelper.getUser(message.senderUserId)?.let { user -> res.add(user)