Remove unnecessary check

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

View file

@ -336,10 +336,8 @@ 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)
}
} }
} }
} }