From 927303a26fe983bfbf6f298f8965a8a0f2619225 Mon Sep 17 00:00:00 2001 From: Andy Valdez Date: Tue, 9 Apr 2024 14:39:36 -0400 Subject: [PATCH] [Bug] Remove an if level. --- .../ui/stats/refresh/lists/sections/BaseStatsUseCase.kt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/lists/sections/BaseStatsUseCase.kt b/WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/lists/sections/BaseStatsUseCase.kt index d3aa900183df..5183aa3f56cc 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/lists/sections/BaseStatsUseCase.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/lists/sections/BaseStatsUseCase.kt @@ -91,11 +91,9 @@ abstract class BaseStatsUseCase( val useCaseState = when (state) { is Error -> ERROR is Data -> { - if (!state.cached) { - if (domainModel != state.model) { - domainModel = state.model - updateState() - } + if (!state.cached && domainModel != state.model) { + domainModel = state.model + updateState() } SUCCESS }