From 352582d765a23d93af2cf342e34758e6d0d88c0d Mon Sep 17 00:00:00 2001 From: Kevin Boulongne Date: Tue, 12 Nov 2024 10:42:39 +0100 Subject: [PATCH 1/4] refactor: Remove comment that doesn't make any sense --- .../ui/screen/main/received/ReceivedScreenWrapper.kt | 1 - .../ui/screen/main/settings/SettingsScreenWrapper.kt | 1 - 2 files changed, 2 deletions(-) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/received/ReceivedScreenWrapper.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/received/ReceivedScreenWrapper.kt index c9b10a060..cbae1e170 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/received/ReceivedScreenWrapper.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/received/ReceivedScreenWrapper.kt @@ -69,7 +69,6 @@ private fun DetailPane(navigator: ThreePaneScaffoldNavigator) { } } -// Show the detail pane content if selected item is available @Composable private fun NoSelectionEmptyState() { Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsScreenWrapper.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsScreenWrapper.kt index ce44ebdc6..b20233f8e 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsScreenWrapper.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsScreenWrapper.kt @@ -162,7 +162,6 @@ private fun DetailPane( } } -// Show the detail pane content if selected item is available @Composable private fun NoSelectionEmptyState() { Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { From 1b8a6912354c48a82f714d31ca1e0a3f00ed4345 Mon Sep 17 00:00:00 2001 From: Kevin Boulongne Date: Tue, 12 Nov 2024 15:56:20 +0100 Subject: [PATCH 2/4] refactor: Remove dead code --- Core2/src/main/res/values-fr/strings.xml | 2 +- app/src/main/res/values-fr/strings.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Core2/src/main/res/values-fr/strings.xml b/Core2/src/main/res/values-fr/strings.xml index 63bc95cf2..664a675ce 100644 --- a/Core2/src/main/res/values-fr/strings.xml +++ b/Core2/src/main/res/values-fr/strings.xml @@ -15,7 +15,7 @@ ~ You should have received a copy of the GNU General Public License ~ along with this program. If not, see . --> - + Annuler Réessayer diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 5c505fc63..3eece9ab6 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -15,7 +15,7 @@ ~ You should have received a copy of the GNU General Public License ~ along with this program. If not, see . --> - + Paramètres avancés Ajouter des fichiers Annuler From 4a076fe2a997c14277c12dc6ac07aaacf1718ee8 Mon Sep 17 00:00:00 2001 From: Kevin Boulongne Date: Tue, 12 Nov 2024 15:48:56 +0100 Subject: [PATCH 3/4] refactor: Delete unused `SentListScreen` --- .../ui/screen/main/sent/SentListScreen.kt | 53 ------------------- .../ui/screen/main/sent/SentScreen.kt | 6 +-- 2 files changed, 1 insertion(+), 58 deletions(-) delete mode 100644 app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/sent/SentListScreen.kt diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/sent/SentListScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/sent/SentListScreen.kt deleted file mode 100644 index 41e928167..000000000 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/sent/SentListScreen.kt +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Infomaniak SwissTransfer - Android - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.infomaniak.swisstransfer.ui.screen.main.sent - -import androidx.compose.foundation.layout.padding -import androidx.compose.material3.Surface -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import androidx.compose.ui.tooling.preview.PreviewParameter -import com.infomaniak.multiplatform_swisstransfer.common.interfaces.ui.TransferUi -import com.infomaniak.swisstransfer.ui.components.FileItemList -import com.infomaniak.swisstransfer.ui.previewparameter.TransferUiListPreviewParameter -import com.infomaniak.swisstransfer.ui.previewparameter.filesPreviewData -import com.infomaniak.swisstransfer.ui.theme.Margin -import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme -import com.infomaniak.swisstransfer.ui.utils.PreviewAllWindows - -@Composable -fun SentListScreen(transfers: List) { - FileItemList( - modifier = Modifier.padding(Margin.Medium), - files = filesPreviewData, // TODO: Use real data - isRemoveButtonVisible = true, - isCheckboxVisible = { false }, - isUidChecked = { false }, - setUidCheckStatus = { _, _ -> }, - ) -} - -@PreviewAllWindows -@Composable -private fun Preview(@PreviewParameter(TransferUiListPreviewParameter::class) transfers: List) { - SwissTransferTheme { - Surface { - SentListScreen(transfers) - } - } -} diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/sent/SentScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/sent/SentScreen.kt index cc2f32a97..b2521f279 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/sent/SentScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/sent/SentScreen.kt @@ -52,11 +52,7 @@ private fun SentScreen(transfers: List?) { } }, ) { - if (transfers.isEmpty()) { - SentEmptyScreen() - } else { - SentListScreen(transfers) - } + if (transfers.isEmpty()) SentEmptyScreen() } } From c13c3df3095ba488ce416540777ffe918e226cc0 Mon Sep 17 00:00:00 2001 From: Kevin Boulongne Date: Tue, 12 Nov 2024 16:45:56 +0100 Subject: [PATCH 4/4] refactor: Remove double jumped lines --- .../java/com/infomaniak/swisstransfer/ui/components/Buttons.kt | 2 -- .../infomaniak/swisstransfer/ui/components/CrossCircleButton.kt | 1 - .../illus/uploadError/GhostMagnifyingGlassQuestionMark.kt | 1 - .../newtransfer/importfiles/components/ImportedFilesCard.kt | 1 - 4 files changed, 5 deletions(-) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/Buttons.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/Buttons.kt index b76efb3cb..928137abf 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/Buttons.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/Buttons.kt @@ -42,7 +42,6 @@ import com.infomaniak.swisstransfer.ui.theme.Dimens import com.infomaniak.swisstransfer.ui.theme.Margin import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme - /** * Specifying a progress has the priority over specifying showIndeterminateProgress */ @@ -70,7 +69,6 @@ fun LargeButton( ) } - /** * Specifying a progress has the priority over specifying showIndeterminateProgress */ diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/CrossCircleButton.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/CrossCircleButton.kt index 3da08268b..f0c3a2199 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/CrossCircleButton.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/CrossCircleButton.kt @@ -62,7 +62,6 @@ fun BoxScope.CrossCircleButton(onClick: (() -> Unit)?, size: Dp = 48.dp) { } } - @PreviewLightAndDark @Composable private fun CrossCircleButtonPreview() { diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/images/illus/uploadError/GhostMagnifyingGlassQuestionMark.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/images/illus/uploadError/GhostMagnifyingGlassQuestionMark.kt index f8a36198c..eeb02be0f 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/images/illus/uploadError/GhostMagnifyingGlassQuestionMark.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/images/illus/uploadError/GhostMagnifyingGlassQuestionMark.kt @@ -17,7 +17,6 @@ */ package com.infomaniak.swisstransfer.ui.images.illus.uploadError - import android.content.res.Configuration import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Box diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/components/ImportedFilesCard.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/components/ImportedFilesCard.kt index fcb0ad05d..94a55e3da 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/components/ImportedFilesCard.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/components/ImportedFilesCard.kt @@ -123,7 +123,6 @@ private data class TransferLazyRowKey( } } - @PreviewLightAndDark @Composable private fun ImportedFilesCardPreview(@PreviewParameter(FileUiListPreviewParameter::class) files: List) {