From 38ce99996562992d2ad4d8f3a505ef11318dee0f Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Thu, 1 Aug 2024 14:28:24 +0200 Subject: [PATCH] fix balance card color --- .../eu/m724/vastapp/activity/dashboard/screen/Dashboard.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/m724/vastapp/activity/dashboard/screen/Dashboard.kt b/app/src/main/java/eu/m724/vastapp/activity/dashboard/screen/Dashboard.kt index 77829fe..7d7fbbc 100644 --- a/app/src/main/java/eu/m724/vastapp/activity/dashboard/screen/Dashboard.kt +++ b/app/src/main/java/eu/m724/vastapp/activity/dashboard/screen/Dashboard.kt @@ -19,6 +19,7 @@ import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text +import androidx.compose.material3.TextFieldDefaults import androidx.compose.material3.pulltorefresh.PullToRefreshBox import androidx.compose.material3.pulltorefresh.rememberPullToRefreshState import androidx.compose.runtime.Composable @@ -157,12 +158,12 @@ fun DashboardScreen(dashboardViewModel: DashboardViewModel) { @Composable fun balanceCardColor(balance: Double): Color { - return if (balance > 0) CardDefaults.cardColors().containerColor else MaterialTheme.colorScheme.errorContainer + return if (balance > 0) Color.Unspecified else MaterialTheme.colorScheme.errorContainer } @Composable fun balanceColor(balance: Double, warningThreshold: Double): Color { - return if (balance > warningThreshold) MaterialTheme.colorScheme.secondary else MaterialTheme.colorScheme.error + return if (balance > warningThreshold) Color.Unspecified else MaterialTheme.colorScheme.error } @Composable