User search : show a loader when fetching results
This commit is contained in:
parent
c6d109c424
commit
690a165411
21 changed files with 135 additions and 81 deletions
|
|
@ -20,5 +20,5 @@ import kotlinx.coroutines.flow.Flow
|
|||
|
||||
interface UserRepository {
|
||||
|
||||
suspend fun search(query: String): Flow<List<UserSearchResult>>
|
||||
fun search(query: String): Flow<UserSearchResultsState>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,3 +22,8 @@ data class UserSearchResult(
|
|||
val matrixUser: MatrixUser,
|
||||
val isUnresolved: Boolean = false,
|
||||
)
|
||||
|
||||
data class UserSearchResultsState(
|
||||
val results: List<UserSearchResult>,
|
||||
val isFetchingSearchResults: Boolean
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue