Skip to content

Commit 7234edb

Browse files
committed
fix coin adding when user fail
1 parent 0b2afd8 commit 7234edb

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

composeApp/src/commonMain/kotlin/neth/iecal/trease/viewmodels/HomeScreenViewModel.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,12 @@ class HomeScreenViewModel : ViewModel() {
158158

159159
)
160160
)
161-
coinManager.addCoins(
162-
calculateRewardedCoin()
163-
)
164-
coins.value = coinManager.reloadCoins()
161+
if(timerStatus.value != TimerStatus.HAS_QUIT){
162+
coinManager.addCoins(
163+
calculateRewardedCoin()
164+
)
165+
coins.value = coinManager.reloadCoins()
166+
}
165167
}
166168

167169
}

0 commit comments

Comments
 (0)