remove unnecessary search

This commit is contained in:
Chumva 2018-07-13 14:09:24 +03:00
parent ea524b45da
commit 5c91ad9976

View file

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