Skip to content

Commit

Permalink
Removed unused tooltip status and updated compose bom
Browse files Browse the repository at this point in the history
  • Loading branch information
nkuppan committed Mar 6, 2024
1 parent c4ab0dc commit 5001f1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import com.naveenapps.expensemanager.core.domain.usecase.budget.BudgetUiModel
import com.naveenapps.expensemanager.core.domain.usecase.budget.GetBudgetsUseCase
import com.naveenapps.expensemanager.core.domain.usecase.settings.currency.GetCurrencyUseCase
import com.naveenapps.expensemanager.core.domain.usecase.settings.currency.GetFormattedAmountUseCase
import com.naveenapps.expensemanager.core.domain.usecase.settings.onboarding.GetOnboardingStatusUseCase
import com.naveenapps.expensemanager.core.domain.usecase.settings.onboarding.SetOnboardingStatusUseCase
import com.naveenapps.expensemanager.core.domain.usecase.transaction.GetAmountStateUseCase
import com.naveenapps.expensemanager.core.domain.usecase.transaction.GetTransactionGroupByCategoryUseCase
import com.naveenapps.expensemanager.core.domain.usecase.transaction.GetTransactionWithFilterUseCase
Expand All @@ -30,7 +28,6 @@ import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch
import javax.inject.Inject

@HiltViewModel
Expand All @@ -42,14 +39,9 @@ class DashboardViewModel @Inject constructor(
getAllAccountsUseCase: GetAllAccountsUseCase,
getTransactionGroupByCategoryUseCase: GetTransactionGroupByCategoryUseCase,
getBudgetsUseCase: GetBudgetsUseCase,
private val getOnboardingStatusUseCase: GetOnboardingStatusUseCase,
private val setOnboardingStatusUseCase: SetOnboardingStatusUseCase,
private val appComposeNavigator: AppComposeNavigator,
) : ViewModel() {

private val _showToolTip = MutableStateFlow(false)
val showToolTip = _showToolTip.asStateFlow()

private val _amountUiState = MutableStateFlow(AmountUiState())
val amountUiState = _amountUiState.asStateFlow()

Expand Down Expand Up @@ -127,21 +119,6 @@ class DashboardViewModel @Inject constructor(
getBudgetsUseCase.invoke().onEach {
_budgets.value = it
}.launchIn(viewModelScope)

loadTooltipState()
}

private fun loadTooltipState() {
viewModelScope.launch {
_showToolTip.value = getOnboardingStatusUseCase.invoke().not()
}
}

fun closeToolTip() {
viewModelScope.launch {
setOnboardingStatusUseCase.invoke(true)
loadTooltipState()
}
}

fun openSettings() {
Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ androidxActivity = "1.8.2"
androidxAppCompat = "1.6.1"
androidxMaterial = "1.11.0"
androidxBrowser = "1.7.0"
androidxComposeBom = "2024.02.01"
androidxComposeBom = "2024.02.02"
androidxComposeCompiler = "1.5.7"
androidxComposeRuntimeTracing = "1.0.0-beta01"
material3 = "1.2.0"
material3 = "1.2.1"
androidxCore = "1.12.0"
androidxCoreSplashscreen = "1.0.1"
androidxDataStore = "1.0.0"
Expand Down Expand Up @@ -51,7 +51,7 @@ kotlinxCoroutines = "1.7.3"
kotlinxDatetime = "0.4.1"
kotlinxSerializationJson = "1.6.0"
ksp = "1.9.21-1.0.16"
lint = "31.2.2"
lint = "31.3.0"
okhttp = "4.12.0"
protobuf = "3.24.4"
protobufPlugin = "0.9.4"
Expand Down

0 comments on commit 5001f1c

Please sign in to comment.