Skip to content

Commit

Permalink
Replace [0] accessor with .first()
Browse files Browse the repository at this point in the history
  • Loading branch information
LunarX committed Oct 18, 2024
1 parent 7e64047 commit da57824
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ object HumanReadableSizeUtils {

return if (sizeParts.size == 2) {
val local = resources.configuration.getLocales().get(0)
val parsedNumber = NumberFormat.getInstance(local).parse(sizeParts[0])
val parsedNumber = NumberFormat.getInstance(local).parse(sizeParts.first())
parsedNumber?.toDouble()?.toInt() ?: 0
} else {
0
Expand Down

0 comments on commit da57824

Please sign in to comment.