Эх сурвалжийг харах

don't create room on clicking contacts when creating a new conversation

Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
sowjanyakch 7 сар өмнө
parent
commit
b5f7556b3d

+ 8 - 6
app/src/main/java/com/nextcloud/talk/contacts/ContactsActivityCompose.kt

@@ -111,12 +111,14 @@ fun ContactItemRow(contact: AutocompleteUser, contactsViewModel: ContactsViewMod
         modifier = Modifier
             .fillMaxWidth()
             .clickable {
-                contactsViewModel.createRoom(
-                    CompanionClass.ROOM_TYPE_ONE_ONE,
-                    contact.source!!,
-                    contact.id!!,
-                    null
-                )
+                if (!contactsViewModel.isAddParticipantsView.value) {
+                    contactsViewModel.createRoom(
+                        CompanionClass.ROOM_TYPE_ONE_ONE,
+                        contact.source!!,
+                        contact.id!!,
+                        null
+                    )
+                }
             },
         verticalAlignment = Alignment.CenterVertically
     ) {