Skip to content

Commit

Permalink
fix: Add NNBSP in getQuantityFromHumanReadableSize(…)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed Oct 31, 2024
1 parent b8ff895 commit 766cc7b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ object HumanReadableSizeUtils {
}

private fun Context.getQuantityFromHumanReadableSize(humanReadableSize: String): Int {
// Space character for languages such as EN and NBSP character for languages such as FR
val sizeParts = humanReadableSize.split(' ', Typography.nbsp)
// Space character for languages such as EN
// NBSP & NNBSP characters for languages such as FR
val sizeParts = humanReadableSize.split(' ', Typography.nbsp, '')

return if (sizeParts.size == 2) {
val local = resources.configuration.getLocales().get(0)
Expand Down

0 comments on commit 766cc7b

Please sign in to comment.