Skip to content

Commit

Permalink
Update budget range whenever campaign duration is updated
Browse files Browse the repository at this point in the history
  • Loading branch information
JorgeMucientes committed Jan 24, 2024
1 parent 997dd8d commit 11dc849
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class BlazeCampaignBudgetViewModel @Inject constructor(

fun onCampaignDurationUpdated(duration: Int) {
_viewState.value = _viewState.value?.copy(
budgetRange = getBudgetRange(duration),
durationInDays = duration,
dailySpending = getDailySpending(viewState.value?.totalBudget!!, duration)
)
Expand Down

0 comments on commit 11dc849

Please sign in to comment.