Skip to content

Commit

Permalink
Fix compiler/ lint warning
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinguitar committed Sep 4, 2023
1 parent 4af544e commit 4b96f3e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ internal fun Project.configureComposeAndroid(
"-opt-in=androidx.compose.ui.ExperimentalComposeUiApi",
"-opt-in=androidx.compose.foundation.ExperimentalFoundationApi",
"-opt-in=androidx.compose.foundation.layout.ExperimentalLayoutApi",
"-opt-in=androidx.compose.material3.windowsizeclass.ExperimentalMaterial3WindowSizeClassApi",
) + buildComposeMetricsParameters()
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.kevlina.budgetplus.core.adaptive

import android.app.Activity
import androidx.compose.material3.windowsizeclass.ExperimentalMaterial3WindowSizeClassApi
import androidx.compose.material3.windowsizeclass.WindowHeightSizeClass
import androidx.compose.material3.windowsizeclass.WindowWidthSizeClass
import androidx.compose.material3.windowsizeclass.calculateWindowSizeClass
Expand All @@ -18,6 +19,7 @@ data class WindowSizeClass(

companion object {

@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
@Composable
fun calculate(): WindowSizeClass {
val activity = LocalContext.current as Activity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
Expand All @@ -31,17 +30,9 @@ internal fun OverviewHeader(
val authors by vm.authors.collectAsStateWithLifecycle()
val selectedAuthor by vm.selectedAuthor.collectAsStateWithLifecycle()

val totalPriceText = remember(totalPrice) {
totalPrice.dollar
}

val balanceText = remember(balance) {
balance.dollar
}

val isBalanceCardVisible = remember(recordGroups) {
recordGroups?.isNotEmpty() == true
}
val totalPriceText = totalPrice.dollar
val balanceText = balance.dollar
val isBalanceCardVisible = recordGroups?.isNotEmpty() == true

Column(
horizontalAlignment = Alignment.CenterHorizontally,
Expand Down

0 comments on commit 4b96f3e

Please sign in to comment.