Skip to content

Commit

Permalink
Updating the libs.versions.toml and fixing the transaction type chang…
Browse files Browse the repository at this point in the history
…e not changing the category type
  • Loading branch information
nkuppan12 committed Oct 28, 2024
1 parent 067d0bd commit 9f9fd6c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ class TransactionCreateViewModel @Inject constructor(
combine(
transactionType,
getAllCategoryUseCase.invoke(),
) { transactionType, categories ->
settingsRepository.getDefaultIncomeCategory(),
settingsRepository.getDefaultExpenseCategory()
) { transactionType, categories, defaultIncomeCategory, defaultExpenseCategory ->
val filteredCategories = categories.filter { category ->
if (transactionType.isIncome()) {
category.type.isIncome()
Expand All @@ -165,11 +167,11 @@ class TransactionCreateViewModel @Inject constructor(

val categoryId = when (transactionType) {
TransactionType.INCOME -> {
settingsRepository.getDefaultIncomeCategory().firstOrNull()
defaultIncomeCategory
}

TransactionType.EXPENSE -> {
settingsRepository.getDefaultExpenseCategory().firstOrNull()
defaultExpenseCategory
}

else -> {
Expand All @@ -185,7 +187,7 @@ class TransactionCreateViewModel @Inject constructor(
selectedCategory = if (transaction != null) {
expenseCategory ?: filteredCategories.firstOrNull() ?: defaultCategory
} else {
defaultCategory
filteredCategories.firstOrNull() ?: defaultCategory
},
categories = filteredCategories
)
Expand Down
32 changes: 16 additions & 16 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[versions]
accompanist = "0.34.0"
androidDesugarJdkLibs = "2.0.4"
androidGradlePlugin = "8.5.2"
androidxActivity = "1.9.2"
androidGradlePlugin = "8.7.1"
androidxActivity = "1.9.3"
androidxAppCompat = "1.7.0"
androidxMaterial = "1.12.0"
androidxBrowser = "1.7.0"
androidxComposeBom = "2024.09.03"
androidxComposeBom = "2024.10.00"
androidxComposeCompiler = "1.5.14"
androidxComposeRuntimeTracing = "1.7.3"
androidxComposeRuntimeTracing = "1.7.4"
lottieCompose = "6.4.0"
material3 = "1.3.0"
androidxCore = "1.13.1"
Expand All @@ -17,10 +17,10 @@ androidxDataStore = "1.1.1"
androidxEspresso = "3.6.1"
androidxHiltNavigationCompose = "1.2.0"
androidxLifecycle = "2.8.6"
androidxMacroBenchmark = "1.3.2"
benchmark = "1.3.2"
androidxMacroBenchmark = "1.3.3"
benchmark = "1.3.3"
androidxMetrics = "1.0.0-beta01"
androidxNavigation = "2.8.2"
androidxNavigation = "2.8.3"
androidxProfileinstaller = "1.4.1"
androidxSplashScreen = "1.0.1"
androidxStartup = "1.2.0"
Expand All @@ -33,45 +33,45 @@ androidxTracing = "1.2.0"
androidxUiAutomator = "2.3.0"
androidxWindowManager = "1.3.0"
androidxWork = "2.9.1"
firebaseBom = "33.4.0"
firebaseBom = "33.5.1"
firebaseCrashlyticsPlugin = "3.0.2"
firebasePerfPlugin = "1.4.2"
firebaseDistribution = "5.0.0"
googleOss = "17.1.0"
opencsv = "4.6"
review = "2.0.1"
review = "2.0.2"
googleOssPlugin = "0.10.6"
spotless = "6.23.0"
hilt = "2.51.1"
hiltExt = "1.2.0"
jacoco = "0.8.12"
junit4 = "4.13.2"
kotlin = "2.0.0"
kotlinxCoroutines = "1.8.0"
kotlinxCoroutines = "1.8.1"
kotlinxDatetime = "0.5.0"
kotlinxSerializationJson = "1.6.3"
ksp = "2.0.0-1.0.21"
lint = "31.7.0"
lint = "31.7.1"
okhttp = "4.12.0"
retrofit = "2.9.0"
retrofit = "2.11.0"
retrofitKotlinxSerializationJson = "1.0.0"
robolectric = "4.12.2"
robolectric = "4.13"
room = "2.6.1"
secrets = "2.0.1"
turbine = "1.1.0"
ossLicense = "0.10.5"
mpcharts = "v3.1.0"
mockito = "4.0.0"
mockito = "5.4.0"
jxl = "2.6.12"
truth = "1.4.2"
vico = "1.11.1"
play-publish = "3.9.1"
google-services = "4.4.2"
backup-restore = "1.0.0-beta13"
baselineprofile = "1.2.2"
gson = "2.10.1"
gson = "2.11.0"
dependency-analysis = "1.27.0"
coil = "2.6.0"
coil = "2.7.0"

[libraries]
accompanist-permissions = { group = "com.google.accompanist", name = "accompanist-permissions", version.ref = "accompanist" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Jul 20 22:34:12 CEST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 9f9fd6c

Please sign in to comment.