From fa550d107090fd9bb5dc220e72cad2387b9f6745 Mon Sep 17 00:00:00 2001 From: Vincent TE Date: Wed, 23 Oct 2024 14:16:19 +0200 Subject: [PATCH] Use space left instead of files size in ImportFilesScreen --- .../ui/screen/newtransfer/importfiles/ImportFilesScreen.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/ImportFilesScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/ImportFilesScreen.kt index f20578cfc..e668553d2 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/ImportFilesScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/ImportFilesScreen.kt @@ -36,6 +36,7 @@ import com.infomaniak.swisstransfer.ui.screen.newtransfer.importfiles.components import com.infomaniak.swisstransfer.ui.theme.Margin import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme import com.infomaniak.swisstransfer.ui.utils.HumanReadableSizeUtils.getFilesSize +import com.infomaniak.swisstransfer.ui.utils.HumanReadableSizeUtils.getSpaceLeft import com.infomaniak.swisstransfer.ui.utils.PreviewAllWindows @Composable @@ -66,7 +67,7 @@ private fun ImportFilesScreen( val importedFiles = files() val humanReadableSize = remember(importedFiles) { - context.getFilesSize(importedFiles) + context.getSpaceLeft(importedFiles) } val isSendButtonEnabled by remember { derivedStateOf { importedFiles.isNotEmpty() } }