mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-10 06:14:10 +01:00
remove already selected participants from the list
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
652dd5033a
commit
4f8584bc75
@ -114,6 +114,10 @@ class ContactsViewModel @Inject constructor(
|
|||||||
if (hideAlreadyAddedParticipants && !_clickAddButton.value) {
|
if (hideAlreadyAddedParticipants && !_clickAddButton.value) {
|
||||||
contactsList?.removeAll(selectedParticipants.value)
|
contactsList?.removeAll(selectedParticipants.value)
|
||||||
}
|
}
|
||||||
|
if (_clickAddButton.value) {
|
||||||
|
contactsList?.removeAll(selectedParticipants.value)
|
||||||
|
contactsList?.addAll(_selectedContacts.value)
|
||||||
|
}
|
||||||
_contactsViewState.value = ContactsUiState.Success(contactsList)
|
_contactsViewState.value = ContactsUiState.Success(contactsList)
|
||||||
} catch (exception: Exception) {
|
} catch (exception: Exception) {
|
||||||
_contactsViewState.value = ContactsUiState.Error(exception.message ?: "")
|
_contactsViewState.value = ContactsUiState.Error(exception.message ?: "")
|
||||||
|
Loading…
Reference in New Issue
Block a user