diff --git a/app/src/main/java/com/rosetta/messenger/ui/chats/ChatsListViewModel.kt b/app/src/main/java/com/rosetta/messenger/ui/chats/ChatsListViewModel.kt index e24be6b..430931d 100644 --- a/app/src/main/java/com/rosetta/messenger/ui/chats/ChatsListViewModel.kt +++ b/app/src/main/java/com/rosetta/messenger/ui/chats/ChatsListViewModel.kt @@ -157,8 +157,8 @@ class ChatsListViewModel(application: Application) : AndroidViewModel(applicatio val firstAttachment = attachments.getJSONObject(0) val type = firstAttachment.optInt("type", -1) when (type) { - 2 -> "Photo" // AttachmentType.IMAGE - 3 -> "File" // AttachmentType.FILE + 0 -> "Photo" // AttachmentType.IMAGE = 0 + 2 -> "File" // AttachmentType.FILE = 2 else -> null } } else null @@ -240,8 +240,8 @@ class ChatsListViewModel(application: Application) : AndroidViewModel(applicatio val firstAttachment = attachments.getJSONObject(0) val type = firstAttachment.optInt("type", -1) when (type) { - 2 -> "Photo" // AttachmentType.IMAGE - 3 -> "File" // AttachmentType.FILE + 0 -> "Photo" // AttachmentType.IMAGE = 0 + 2 -> "File" // AttachmentType.FILE = 2 else -> null } } else null