Skip to content

Commit

Permalink
[#3925] Avoid updating output when not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaozhan committed Sep 14, 2024
1 parent d104616 commit a8a276d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ class CalculatorViewModel(

analyticsManager.trackEvent(Event.BaseChange(Param.Base(newBase)))
analyticsManager.setUserProperty(UserProperty.BaseCurrency(newBase))

updateConversion()
}

// region Event
Expand Down Expand Up @@ -280,7 +282,6 @@ class CalculatorViewModel(
.takeIf { it != state.value.base }
?.let {
setState { copy(base = it) }
calculateOutput(state.value.input)
}
}
// endregion
Expand Down

0 comments on commit a8a276d

Please sign in to comment.