From 605273e72d1ba19f18fb3911a2cc3a0688484aba Mon Sep 17 00:00:00 2001 From: Kevin Boulongne Date: Tue, 24 Sep 2024 16:38:49 +0200 Subject: [PATCH] Rename `SwissTransferTobAppBar` into `SwissTransferTopAppBar` --- ...wissTransferTobAppBar.kt => SwissTransferTopAppBar.kt} | 8 ++++---- .../ui/screen/main/settings/components/OptionScaffold.kt | 4 ++-- .../screen/newtransfer/importfiles/ImportFilesScreen.kt | 3 ++- .../screen/newtransfer/importfiles/TransferTypeScreen.kt | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) rename app/src/main/java/com/infomaniak/swisstransfer/ui/components/{SwissTransferTobAppBar.kt => SwissTransferTopAppBar.kt} (95%) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTobAppBar.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTopAppBar.kt similarity index 95% rename from app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTobAppBar.kt rename to app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTopAppBar.kt index 864f110b6..b6f18d2f0 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTobAppBar.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTopAppBar.kt @@ -34,10 +34,10 @@ import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow @Composable @OptIn(ExperimentalMaterial3Api::class) -fun SwissTransferTobAppBar( +fun SwissTransferTopAppBar( @StringRes titleRes: Int, navigationMenu: TopAppBarButton? = null, - vararg actionMenus: TopAppBarButton + vararg actionMenus: TopAppBarButton, ) { TopAppBar( colors = TopAppBarDefaults.topAppBarColors( @@ -78,9 +78,9 @@ data class TopAppBarButton( @PreviewSmallWindow @PreviewLargeWindow @Composable -private fun SwissTransferTobAppBarPreview() { +private fun SwissTransferTopAppBarPreview() { SwissTransferTheme { - SwissTransferTobAppBar( + SwissTransferTopAppBar( titleRes = R.string.appName, navigationMenu = TopAppBarButton.backButton {}, TopAppBarButton(AppIcons.Add, R.string.appName) {}, diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/OptionScaffold.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/OptionScaffold.kt index 4f8d69509..d23c054ac 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/OptionScaffold.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/OptionScaffold.kt @@ -29,7 +29,7 @@ import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import com.infomaniak.swisstransfer.R -import com.infomaniak.swisstransfer.ui.components.SwissTransferTobAppBar +import com.infomaniak.swisstransfer.ui.components.SwissTransferTopAppBar import com.infomaniak.swisstransfer.ui.components.TopAppBarButton import com.infomaniak.swisstransfer.ui.screen.main.components.SmallWindowTopAppBarScaffold import com.infomaniak.swisstransfer.ui.screen.main.settings.ThemeOption @@ -47,7 +47,7 @@ fun OptionScaffold( navigateBack: (() -> Unit)?, ) { SmallWindowTopAppBarScaffold( - smallWindowTopAppBar = { SwissTransferTobAppBar(topAppBarTitleRes, TopAppBarButton.backButton(navigateBack ?: {})) }, + smallWindowTopAppBar = { SwissTransferTopAppBar(topAppBarTitleRes, TopAppBarButton.backButton(navigateBack ?: {})) }, ) { paddingsValue -> Column( modifier = Modifier 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 63be6ebc4..74c759a0d 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 @@ -34,12 +34,13 @@ import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow @Composable fun ImportFilesScreen(navigateToTransferTypeScreen: () -> Unit, closeActivity: () -> Unit) { + var showUploadSourceChoiceBottomSheet by rememberSaveable { mutableStateOf(true) } var isNextButtonEnabled by rememberSaveable { mutableStateOf(false) } BottomStickyButtonScaffold( topBar = { - SwissTransferTobAppBar( + SwissTransferTopAppBar( titleRes = R.string.importFilesScreenTitle, navigationMenu = null, TopAppBarButton.closeButton { closeActivity() }, diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/TransferTypeScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/TransferTypeScreen.kt index 9e6847d62..74dd6584c 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/TransferTypeScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/TransferTypeScreen.kt @@ -30,7 +30,7 @@ import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign import com.infomaniak.swisstransfer.R -import com.infomaniak.swisstransfer.ui.components.SwissTransferTobAppBar +import com.infomaniak.swisstransfer.ui.components.SwissTransferTopAppBar import com.infomaniak.swisstransfer.ui.components.TopAppBarButton import com.infomaniak.swisstransfer.ui.images.AppImages.AppIllus import com.infomaniak.swisstransfer.ui.images.illus.ChainTilted @@ -47,7 +47,7 @@ import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow fun TransferTypeScreen(navigateToTransfer: (TransferType) -> Unit, popBack: () -> Unit, closeActivity: () -> Unit) { Scaffold( topBar = { - SwissTransferTobAppBar( + SwissTransferTopAppBar( titleRes = R.string.transferTypeScreenTitle, navigationMenu = TopAppBarButton.backButton(popBack), TopAppBarButton.closeButton { closeActivity() },