Add comments

This commit is contained in:
Florian Renaud
2023-03-14 16:13:01 +01:00
parent a1cc38f8e6
commit 1db8e2744e

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)
}