Fix "Live now" list

This commit is contained in:
Alex Sytnyk 2018-06-27 12:43:33 +03:00
parent 2c4cb0407d
commit 6a8890a4be
2 changed files with 2 additions and 2 deletions

View file

@ -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) {

View file

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