From 23be3c4764c323f2141a10615620c6271c60dc25 Mon Sep 17 00:00:00 2001 From: Chumva Date: Wed, 5 Sep 2018 11:38:18 +0300 Subject: [PATCH] Remove unnecessary check --- .../src/net/osmand/telegram/ui/LiveNowTabFragment.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt index dbfb0e9df1..173a9b3f5b 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt @@ -336,10 +336,8 @@ class LiveNowTabFragment : Fragment(), TelegramListener, TelegramIncomingMessage val res = mutableListOf() messages.forEach { message -> if (!addOnlyViaBotMessages || message.viaBotUserId != 0) { - TelegramUiHelper.messageToChatItem(telegramHelper, chat, message).also { - if (it != null) { - res.add(it) - } + TelegramUiHelper.messageToChatItem(telegramHelper, chat, message)?.also { + res.add(it) } } }