GP divide by 1k

This commit is contained in:
Dude so hot authored and renovate[bot] committed 2024-10-19 22:53:37 +08:00
1 parent d66fb9a783
commit 6601a45472
3 files changed
+5 -2

No files matched your search

@@ -60,7 +60,7 @@ object ArchiveParser {
archiveList.add(item)
}
val funds = maybeFunds ?: PATTERN_CURRENT_FUNDS.find(body)!!.groupValues.run {
val fundsGP = ParserUtils.parseInt(get(1), 0)
val fundsGP = ParserUtils.parseInt(get(1), 0) / 1000
val fundsC = ParserUtils.parseInt(get(2), 0)
Funds(fundsGP, fundsC)
}
@@ -29,7 +29,7 @@ object HomeParser {
fun parseFunds(body: String): Funds {
FundsRegex.find(body)?.groupValues?.run {
val fundsC = ParserUtils.parseInt(get(1), 0)
val fundsGP = ParserUtils.parseInt(get(2), 0) * 1000
val fundsGP = ParserUtils.parseInt(get(2), 0)
return Funds(fundsGP, fundsC)
}
throw ParseException("Parse funds error")
@@ -28,5 +28,8 @@ fun FundsItem(
Text(text = type)
}
RollingNumber(number = amount, style = textStyle, separator = true)
if (type == "GP") {
Text(text = "k")
}
}
}