fix: re-add loading indicator to match details screen
This commit is contained in:
parent
fc496e9eed
commit
7f5f0dcf54
1 changed files with 2 additions and 0 deletions
|
@ -48,6 +48,7 @@ import xyz.leomurca.csgomatches.domain.model.MatchStatus
|
||||||
import xyz.leomurca.csgomatches.domain.model.Player
|
import xyz.leomurca.csgomatches.domain.model.Player
|
||||||
import xyz.leomurca.csgomatches.domain.model.Team
|
import xyz.leomurca.csgomatches.domain.model.Team
|
||||||
import xyz.leomurca.csgomatches.ui.components.ErrorMessage
|
import xyz.leomurca.csgomatches.ui.components.ErrorMessage
|
||||||
|
import xyz.leomurca.csgomatches.ui.components.LoadingIndicator
|
||||||
import xyz.leomurca.csgomatches.ui.navigation.MatchDetailsRoute
|
import xyz.leomurca.csgomatches.ui.navigation.MatchDetailsRoute
|
||||||
import xyz.leomurca.csgomatches.ui.theme.LiveRed
|
import xyz.leomurca.csgomatches.ui.theme.LiveRed
|
||||||
import xyz.leomurca.csgomatches.ui.theme.White
|
import xyz.leomurca.csgomatches.ui.theme.White
|
||||||
|
@ -72,6 +73,7 @@ fun MatchDetailsScreen(
|
||||||
) {
|
) {
|
||||||
val value = uiState.value
|
val value = uiState.value
|
||||||
when {
|
when {
|
||||||
|
value.isLoading -> LoadingIndicator()
|
||||||
value.errorMessage != null -> ErrorMessage(
|
value.errorMessage != null -> ErrorMessage(
|
||||||
message = value.errorMessage,
|
message = value.errorMessage,
|
||||||
onRetry = { loadTeams(matchDetails, viewModel) }
|
onRetry = { loadTeams(matchDetails, viewModel) }
|
||||||
|
|
Loading…
Add table
Reference in a new issue