Skip to content

Commit

Permalink
[Bug] Remove an if level.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Valdez authored and Andy Valdez committed Apr 9, 2024
1 parent 1fd534f commit 927303a
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,9 @@ abstract class BaseStatsUseCase<DOMAIN_MODEL, UI_STATE>(
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
}
Expand Down

0 comments on commit 927303a

Please sign in to comment.