mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 19:56:32 +00:00
Merge pull request #1919 from Hafizzle/Fiz/NumberAbbreviator-fix
Handle different Locale when formatting
This commit is contained in:
commit
d43ef437eb
1 changed files with 3 additions and 1 deletions
|
|
@ -23,7 +23,9 @@ object NumberAbbreviator {
|
|||
if (decimalCount > 0) {
|
||||
pattern = ("$pattern.").padEnd(4 + decimalCount, '#')
|
||||
}
|
||||
val formatter = DecimalFormat(pattern + abbreviationForCounter(context, counter).replace(".", ""))
|
||||
val formatter = DecimalFormat(pattern + abbreviationForCounter(context, counter)
|
||||
.replace(".", "")
|
||||
.replace(",", ""))
|
||||
formatter.roundingMode = RoundingMode.FLOOR
|
||||
return formatter.format(usedNumber)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue