Remove unnecessary check

This commit is contained in:
Chumva 2018-09-05 11:38:18 +03:00
parent b05d510c44
commit 23be3c4764

View file

@ -336,13 +336,11 @@ class LiveNowTabFragment : Fragment(), TelegramListener, TelegramIncomingMessage
val res = mutableListOf<ChatItem>() val res = mutableListOf<ChatItem>()
messages.forEach { message -> messages.forEach { message ->
if (!addOnlyViaBotMessages || message.viaBotUserId != 0) { if (!addOnlyViaBotMessages || message.viaBotUserId != 0) {
TelegramUiHelper.messageToChatItem(telegramHelper, chat, message).also { TelegramUiHelper.messageToChatItem(telegramHelper, chat, message)?.also {
if (it != null) {
res.add(it) res.add(it)
} }
} }
} }
}
return res return res
} }