File tree Expand file tree Collapse file tree
feature/home/src/main/java/com/lamndt/smartmovie/feature/home
multiplatform/composeApp/src/commonMain/kotlin/com/lamndt/smartmovie/multiplatform Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ class HomeViewModel(
5050 fun refresh () {
5151 loadJob?.cancel()
5252 loadJob = viewModelScope.launch {
53- mutableState.update { it.copy(feed = Loadable .Loading ) }
53+ mutableState.update { it.copy(feed = Loadable .Loading , trending = Loadable . Idle ) }
5454 try {
5555 val result = catalog.home(mutableState.value.mediaType, language)
5656 val trending = (catalog as ? CatalogV2Repository )?.let {
Original file line number Diff line number Diff line change @@ -316,7 +316,7 @@ class AppController(
316316 fun reloadHome () {
317317 homeJob?.cancel()
318318 homeJob = scope.launch {
319- mutableState.update { it.copy(home = LoadState .Loading ) }
319+ mutableState.update { it.copy(home = LoadState .Loading , trending = emptyList() ) }
320320 val snapshot = state.value
321321 runCatching { api.home(snapshot.homeType, snapshot.locale.backendTag) }
322322 .propagateCancellation()
You can’t perform that action at this time.
0 commit comments