Skip to content

Commit

Permalink
Revert "fixed issues with bonus amount being displayed incorrectly an…
Browse files Browse the repository at this point in the history
…d being unable to be decremented"

This reverts commit 0b1c376.
  • Loading branch information
mtgriego committed Apr 2, 2024
1 parent 0b1c376 commit 74128ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -685,11 +685,7 @@ fun ItemizedRewardListContainer(

Row {
Text(
text = stringResource(
id =
if (rewardsList.isNotEmpty()) R.string.Bonus_support
else R.string.Pledge_without_a_reward
),
text = stringResource(id = R.string.Bonus_support),
style = typography.subheadlineMedium,
color = colors.textSecondary
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ class ConfirmDetailsViewModel(val environment: Environment) : ViewModel() {
if (::projectData.isInitialized) {
pledgeReason = pledgeDataAndPledgeReason(projectData, reward).second
}
addedBonusSupport = 0.0

updateShippingAmount()

Expand Down Expand Up @@ -231,7 +230,7 @@ class ConfirmDetailsViewModel(val environment: Environment) : ViewModel() {
}

fun decrementBonusSupport() {
if ((addedBonusSupport + initialBonusSupport) - minStepAmount >= initialBonusSupport) {
if (addedBonusSupport - minStepAmount >= initialBonusSupport) {
addedBonusSupport -= minStepAmount
totalAmount = calculateTotal()
viewModelScope.launch {
Expand Down

0 comments on commit 74128ca

Please sign in to comment.