Apply RollingNumber to gp & c
This commit is contained in:
1 parent
87d0cdd9e5
commit
f9c812864e
3 files changed
+5
-5
No files matched your search
@@ -62,7 +62,7 @@ object ArchiveParser {
|
||||
val funds = maybeFunds ?: PATTERN_CURRENT_FUNDS.find(body)!!.groupValues.run {
|
||||
val fundsGP = ParserUtils.parseInt(get(1), 0)
|
||||
val fundsC = ParserUtils.parseInt(get(2), 0)
|
||||
Funds("%,d".format(fundsGP), "%,d".format(fundsC))
|
||||
Funds(fundsGP, fundsC)
|
||||
}
|
||||
return Result(paramOr, archiveList, funds)
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ object HomeParser {
|
||||
FundsRegex.find(body)?.groupValues?.run {
|
||||
val fundsC = ParserUtils.parseInt(get(1), 0)
|
||||
val fundsGP = ParserUtils.parseInt(get(2), 0) * 1000
|
||||
return Funds("%,d+".format(fundsGP), "%,d".format(fundsC))
|
||||
return Funds(fundsGP, fundsC)
|
||||
}
|
||||
throw ParseException("Parse funds error")
|
||||
}
|
||||
@@ -40,7 +40,7 @@ object HomeParser {
|
||||
}
|
||||
|
||||
@Parcelize
|
||||
data class Funds(val gp: String, val credit: String) : Parcelable
|
||||
data class Funds(val gp: Int, val credit: Int) : Parcelable
|
||||
|
||||
@Parcelize
|
||||
@Serializable
|
||||
|
||||
@@ -15,7 +15,7 @@ import androidx.compose.ui.unit.dp
|
||||
@Composable
|
||||
fun FundsItem(
|
||||
type: String,
|
||||
amount: String,
|
||||
amount: Int,
|
||||
modifier: Modifier = Modifier,
|
||||
textStyle: TextStyle = LocalTextStyle.current,
|
||||
) {
|
||||
@@ -27,6 +27,6 @@ fun FundsItem(
|
||||
Badge(containerColor = MaterialTheme.colorScheme.primaryContainer) {
|
||||
Text(text = type)
|
||||
}
|
||||
Text(text = amount, style = textStyle)
|
||||
RollingNumber(number = amount, style = textStyle)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user