Add comments

This commit is contained in:
Florian Renaud 2023-03-14 16:13:01 +01:00
parent 74fdb34269
commit 87d50a18a5

View file

@ -55,11 +55,13 @@ class CreateRoomRootPresenter @Inject constructor() : Presenter<CreateRoomRootSt
}
LaunchedEffect(searchQuery) {
// Clear the search results before performing the search, manually add a fake result with the matrixId, if any
searchResults.value = if (MatrixPatterns.isUserId(searchQuery)) {
persistentListOf(MatrixUser(UserId(searchQuery)))
} else {
persistentListOf()
}
// Perform the search asynchronously
if (searchQuery.isNotEmpty()) {
searchResults.value = performSearch(searchQuery)
}