This commit is contained in:
Chumva 2018-07-13 14:11:32 +03:00
parent 5c91ad9976
commit cc24288a2d

View file

@ -105,7 +105,7 @@ class TelegramHelper private constructor() {
fun getUser(id: Int) = users[id] fun getUser(id: Int) = users[id]
fun getUserMessage(user: TdApi.User) = fun getUserMessage(user: TdApi.User) =
usersLocationMessages.values.firstOrNull { it.senderUserId == user.id } usersLocationMessages.values.firstOrNull { it.senderUserId == user.id }
fun getChatMessages(chatId: Long) = fun getChatMessages(chatId: Long) =
usersLocationMessages.values.filter { it.chatId == chatId } usersLocationMessages.values.filter { it.chatId == chatId }
@ -133,7 +133,7 @@ class TelegramHelper private constructor() {
private fun updateChatIds() { private fun updateChatIds() {
chatTitles.clear() chatTitles.clear()
for (chatEntry in chats.entries) { for (chatEntry in chats.entries) {
chatTitles[chatEntry.value.title] = chatEntry.key chatTitles[chatEntry.value.title] = chatEntry.key
} }
} }