File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
app/src/main/java/to/bitkit/ui/screens/wallets Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,11 @@ class HomeViewModel @Inject constructor(
155155 val totalOnChainSats = walletRepo.balanceState.value.totalSats
156156 val balanceUsd = satsToUsd(totalOnChainSats) ? : return @launch
157157 val thresholdReached = balanceUsd > BigDecimal (BALANCE_THRESHOLD_USD )
158- val isTimeOutOver = settings.lastTimeAskedBalanceWarningMillis - ASK_INTERVAL_MILLIS > ASK_INTERVAL_MILLIS
158+ val isTimeOutOver = if (settings.lastTimeAskedBalanceWarningMillis == 0L ) {
159+ true
160+ } else {
161+ settings.lastTimeAskedBalanceWarningMillis - ASK_INTERVAL_MILLIS > ASK_INTERVAL_MILLIS
162+ }
159163 val belowMaxWarnings = settings.balanceWarningTimes < MAX_WARNINGS
160164
161165 if (thresholdReached && isTimeOutOver && belowMaxWarnings && ! _uiState .value.highBalanceSheetVisible) {
You can’t perform that action at this time.
0 commit comments