From 5c91ad99763cf0c5197ccb8e4d9a704d4c7972a8 Mon Sep 17 00:00:00 2001 From: Chumva Date: Fri, 13 Jul 2018 14:09:24 +0300 Subject: [PATCH] remove unnecessary search --- .../src/net/osmand/telegram/helpers/TelegramHelper.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt b/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt index 1a50b9b69f..dd6e87577c 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramHelper.kt @@ -108,7 +108,7 @@ class TelegramHelper private constructor() { usersLocationMessages.values.firstOrNull { it.senderUserId == user.id } fun getChatMessages(chatId: Long) = - usersLocationMessages.values.filter { chats[it.chatId]?.id == chatId } + usersLocationMessages.values.filter { it.chatId == chatId } fun getMessages() = usersLocationMessages.values.toList()