diff --git a/WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/lists/UiModelMapper.kt b/WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/lists/UiModelMapper.kt index d1fd0bcd541a..4eefe9cab16c 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/lists/UiModelMapper.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/lists/UiModelMapper.kt @@ -99,6 +99,10 @@ class UiModelMapper if (useCaseModels.isNotEmpty()) { UiModel.Success(useCaseModels.mapNotNull { useCaseModel -> when { + useCaseModel.state == LOADING -> useCaseModel.stateData?.let { + StatsBlock.Loading(useCaseModel.type, useCaseModel.stateData) + } + useCaseModel.type == overViewType && useCaseModel.data != null -> StatsBlock.Success( useCaseModel.type, useCaseModel.data @@ -109,10 +113,6 @@ class UiModelMapper useCaseModel.data ?: listOf() ) - useCaseModel.state == LOADING -> useCaseModel.stateData?.let { - StatsBlock.Loading(useCaseModel.type, useCaseModel.stateData) - } - useCaseModel.state == ERROR -> useCaseModel.stateData?.let { StatsBlock.Error(useCaseModel.type, useCaseModel.stateData) }