Updated to new data model
This commit is contained in:
parent
c80b4389aa
commit
1d58a3b9e2
|
@ -3,6 +3,7 @@ package net.codinux.banking.ui.service
|
|||
import androidx.compose.ui.graphics.Color
|
||||
import kotlinx.datetime.*
|
||||
import net.codinux.banking.client.model.Amount
|
||||
import net.codinux.banking.client.model.isNegative
|
||||
import net.codinux.banking.ui.config.Colors
|
||||
import net.codinux.banking.ui.model.TransactionsGrouping
|
||||
|
||||
|
@ -66,7 +67,7 @@ class FormatUtil {
|
|||
|
||||
fun getColorForAmount(amount: Amount, showColoredAmounts: Boolean = true): Color = when {
|
||||
showColoredAmounts == false -> Color.Unspecified
|
||||
amount.toString().startsWith("-") -> Colors.Red600
|
||||
amount.isNegative -> Colors.Red600
|
||||
else -> Colors.Green600
|
||||
}
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ CREATE TABLE IF NOT EXISTS BankAccount (
|
|||
balance TEXT NOT NULL,
|
||||
|
||||
serverTransactionsRetentionDays INTEGER,
|
||||
lastTransactionsRetrievalTime TEXT,
|
||||
lastAccountUpdateTime TEXT,
|
||||
retrievedTransactionsFrom TEXT,
|
||||
|
||||
userSetDisplayName TEXT,
|
||||
|
@ -121,7 +121,7 @@ INSERT INTO BankAccount(
|
|||
|
||||
isAccountTypeSupportedByApplication, features,
|
||||
|
||||
serverTransactionsRetentionDays, lastTransactionsRetrievalTime, retrievedTransactionsFrom,
|
||||
serverTransactionsRetentionDays, lastAccountUpdateTime, retrievedTransactionsFrom,
|
||||
|
||||
userSetDisplayName, displayIndex,
|
||||
|
||||
|
|
Loading…
Reference in New Issue