Skip to content

Commit

Permalink
Fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
wisnukurniawan committed Dec 1, 2024
1 parent bdec3b9 commit d23442c
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 32 deletions.
9 changes: 3 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,6 @@ android {

buildFeatures {
viewBinding true

// Fix compose compile error
compose true
}

compileOptions {
Expand Down Expand Up @@ -229,9 +226,9 @@ dependencies {

// Analytics
implementation platform(libs.google.firebase)
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation 'com.google.firebase:firebase-perf-ktx'
implementation 'com.google.firebase:firebase-crashlytics-ktx'
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-perf'
implementation 'com.google.firebase:firebase-crashlytics'
implementation libs.wisnu.foundation.core.analytics
implementation libs.wisnu.foundation.lib.analyticsmanager

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,10 @@ private fun AmountSection(
}
}

private inline fun LazyListScope.AdjustAmountReasonCell(
private fun LazyListScope.AdjustAmountReasonCell(
data: List<AdjustBalanceReasonItem>,
shouldShow: Boolean,
noinline onItemClick: (AdjustBalanceReasonItem) -> Unit
onItemClick: (AdjustBalanceReasonItem) -> Unit
) {
if (shouldShow) {
item {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ private fun BalanceSummaryScreen(
LazyVerticalGrid(
modifier = Modifier.fillMaxSize(),
columns = GridCells.Adaptive(minSize = 150.dp),
horizontalArrangement = Arrangement.spacedBy(8.dp, alignment = Alignment.CenterHorizontally),
horizontalArrangement = Arrangement.spacedBy(
8.dp,
alignment = Alignment.CenterHorizontally
),
verticalArrangement = Arrangement.spacedBy(8.dp),
contentPadding = PaddingValues(horizontal = 16.dp)
) {
Expand Down Expand Up @@ -149,10 +152,10 @@ private fun AllTimeSection(
}
}

private inline fun LazyGridScope.AccountCell(
private fun LazyGridScope.AccountCell(
accountItems: List<AccountItem>,
noinline onClickAccount: (Account) -> Unit,
noinline onClickAddAccount: () -> Unit,
onClickAccount: (Account) -> Unit,
onClickAddAccount: () -> Unit,
) {
item(span = { GridItemSpan(maxLineSpan) }) {
Row(
Expand Down Expand Up @@ -180,7 +183,10 @@ private inline fun LazyGridScope.AccountCell(
amountColor = it.account.getTotalBalanceColor(
MaterialTheme.colorScheme.onBackground
),
totalTransaction = stringResource(R.string.balance_total_transaction, it.totalTransaction),
totalTransaction = stringResource(
R.string.balance_total_transaction,
it.totalTransaction
),
updatedAt = it.account.getDateTimeDisplay(),
isSelected = it.isSelected,
textColor = it.getTextColor(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.wisnu.kurniawan.wallee.features.onboarding.data

import android.content.Context
import com.google.firebase.crashlytics.ktx.crashlytics
import com.google.firebase.crashlytics.ktx.setCustomKeys
import com.google.firebase.ktx.Firebase
import com.google.firebase.Firebase
import com.google.firebase.crashlytics.crashlytics
import com.google.firebase.crashlytics.setCustomKeys
import com.wisnu.kurniawan.wallee.foundation.datasource.local.LocalManager
import com.wisnu.kurniawan.wallee.foundation.datasource.preference.PreferenceManager
import com.wisnu.kurniawan.wallee.foundation.extension.defaultAccount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,11 @@ private fun OnboardingScreen(
Header(
onSettingClick = onSettingClick,
)
Box(modifier = Modifier
.fillMaxSize()
.weight(1F)) {
Box(
modifier = Modifier
.fillMaxSize()
.weight(1F)
) {
Content(
state = state,
onItemClick = onItemClick,
Expand Down Expand Up @@ -181,10 +183,10 @@ private fun Content(
}

@OptIn(ExperimentalFoundationApi::class)
private inline fun LazyListScope.CurrencyCell(
private fun LazyListScope.CurrencyCell(
data: Map<String, List<CurrencyItem>>,
selectedCurrency: Currency?,
noinline onItemClick: (CurrencyItem) -> Unit,
onItemClick: (CurrencyItem) -> Unit,
) {
item {
Row(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ private fun Content(
}
}

private inline fun LazyListScope.TransactionCell(
private fun LazyListScope.TransactionCell(
data: List<TransactionItem>,
noinline onItemClick: (TransactionItem) -> Unit,
onItemClick: (TransactionItem) -> Unit,
) {
if (data.isEmpty()) {
item {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,10 @@ private fun CashFlowContent(
}
}

private inline fun LazyListScope.LastTransactionCell(
private fun LazyListScope.LastTransactionCell(
data: List<TransactionItem>,
noinline onSeeMoreClick: () -> Unit,
noinline onItemClick: (TransactionItem) -> Unit,
onSeeMoreClick: () -> Unit,
onItemClick: (TransactionItem) -> Unit,
) {
item {
Row(
Expand Down Expand Up @@ -447,10 +447,10 @@ private fun TransactionItemCell(
}


private inline fun LazyListScope.TopExpenseCell(
private fun LazyListScope.TopExpenseCell(
data: List<TopExpenseItem>,
currency: Currency,
noinline onSeeMoreClick: () -> Unit,
onSeeMoreClick: () -> Unit,
) {
item {
Row(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private fun Content(
}
}

private inline fun LazyListScope.TopExpenseCell(
private fun LazyListScope.TopExpenseCell(
data: List<TopExpenseItem>,
currency: Currency,
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.wisnu.kurniawan.wallee.foundation.datasource.local

import androidx.room.Dao
import androidx.room.Query
import androidx.room.Transaction
import com.wisnu.kurniawan.wallee.foundation.datasource.local.model.AccountDb
import com.wisnu.kurniawan.wallee.foundation.datasource.local.model.AccountRecordDb
import com.wisnu.kurniawan.wallee.foundation.datasource.local.model.AccountWithTransaction
Expand All @@ -20,6 +21,7 @@ interface WalleeReadDao {
@Query("SELECT * FROM AccountDb")
fun getAccounts(): Flow<List<AccountDb>>

@Transaction
@Query("SELECT * FROM AccountDb")
fun getAccountWithTransactions(): Flow<List<AccountWithTransaction>>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.wisnu.kurniawan.wallee.foundation.theme

import android.os.Build
import android.os.Build.VERSION.SDK_INT
import androidx.appcompat.app.AppCompatActivity
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.MaterialTheme
Expand Down Expand Up @@ -127,9 +129,17 @@ fun Theme(

Theme.WALLPAPER -> {
if (isSystemInDarkTheme()) {
dynamicDarkColorScheme(LocalContext.current)
if (SDK_INT >= Build.VERSION_CODES.S) {
dynamicDarkColorScheme(LocalContext.current)
} else {
NightColorPalette
}
} else {
dynamicLightColorScheme(LocalContext.current)
if (SDK_INT >= Build.VERSION_CODES.S) {
dynamicLightColorScheme(LocalContext.current)
} else {
LightColorPalette
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ fun PgButton(
fun PgSecondaryButton(
onClick: () -> Unit,
modifier: Modifier = Modifier,
border: BorderStroke? = ButtonDefaults.outlinedButtonBorder,
border: BorderStroke? = ButtonDefaults.outlinedButtonBorder(),
content: @Composable RowScope.() -> Unit
) {
OutlinedButton(
Expand Down

0 comments on commit d23442c

Please sign in to comment.