mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Check if user is not already selected
This commit is contained in:
+3
-1
@@ -26,7 +26,9 @@ class UserListDataStore @Inject constructor() {
|
||||
private val selectedUsers: MutableStateFlow<List<MatrixUser>> = MutableStateFlow(emptyList())
|
||||
|
||||
fun selectUser(user: MatrixUser) {
|
||||
selectedUsers.tryEmit(selectedUsers.value.plus(user))
|
||||
if (user !in selectedUsers.value) {
|
||||
selectedUsers.tryEmit(selectedUsers.value.plus(user))
|
||||
}
|
||||
}
|
||||
|
||||
fun removeUserFromSelection(user: MatrixUser) {
|
||||
|
||||
Reference in New Issue
Block a user