Skip to content

Commit

Permalink
fix: Use formatShortFileSize
Browse files Browse the repository at this point in the history
  • Loading branch information
tevincent committed Nov 13, 2024
1 parent 3a0535d commit 6df3c46
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import com.infomaniak.swisstransfer.R
object HumanReadableSizeUtils {
private const val TOTAL_FILE_SIZE: Long = 50_000_000_000L

fun getHumanReadableSize(context: Context, sizeInBytes: Long): String = Formatter.formatFileSize(context, sizeInBytes)
fun getHumanReadableSize(context: Context, sizeInBytes: Long): String = Formatter.formatShortFileSize(context, sizeInBytes)

private fun getFilesSizeInBytes(files: List<FileUi>) = files.sumOf { it.fileSize }

Expand Down

0 comments on commit 6df3c46

Please sign in to comment.