From aed63961af4150806f56917f342f07039ded0a0d Mon Sep 17 00:00:00 2001 From: Kevin Boulongne Date: Thu, 17 Oct 2024 14:27:49 +0200 Subject: [PATCH] feat: Use `@PreviewAllWindows` --- .../swisstransfer/ui/components/BrandTopAppBar.kt | 6 ++---- .../swisstransfer/ui/components/FileItem.kt | 6 ++---- .../swisstransfer/ui/components/FileItemList.kt | 6 ++---- .../ui/components/SwissTransferTopAppBar.kt | 6 ++---- .../swisstransfer/ui/screen/main/MainScreen.kt | 6 ++---- .../ui/screen/main/received/ReceivedScreen.kt | 6 ++---- .../ui/screen/main/sent/SentEmptyScreen.kt | 6 ++---- .../ui/screen/main/sent/SentListScreen.kt | 6 ++---- .../swisstransfer/ui/screen/main/sent/SentScreen.kt | 6 ++---- .../main/settings/SettingsDownloadsLimitScreen.kt | 4 ++-- .../main/settings/SettingsEmailLanguageScreen.kt | 4 ++-- .../ui/screen/main/settings/SettingsScreen.kt | 4 ++-- .../screen/main/settings/SettingsScreenWrapper.kt | 3 +-- .../ui/screen/main/settings/SettingsThemeScreen.kt | 4 ++-- .../main/settings/SettingsValidityPeriodScreen.kt | 4 ++-- .../main/settings/components/OptionScaffold.kt | 6 ++---- .../ui/screen/newtransfer/NewTransferScreen.kt | 6 ++---- .../newtransfer/importfiles/ImportFilesScreen.kt | 13 ++++++++----- .../importfiles/UploadSourceChoiceBottomSheet.kt | 8 +++----- 19 files changed, 44 insertions(+), 66 deletions(-) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/BrandTopAppBar.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/BrandTopAppBar.kt index be9aebe95..c344ffc03 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/BrandTopAppBar.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/BrandTopAppBar.kt @@ -33,8 +33,7 @@ import com.infomaniak.swisstransfer.ui.images.illus.LogoInfomaniak import com.infomaniak.swisstransfer.ui.images.illus.LogoSwissTransfer import com.infomaniak.swisstransfer.ui.theme.Margin import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme -import com.infomaniak.swisstransfer.ui.utils.PreviewLargeWindow -import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow +import com.infomaniak.swisstransfer.ui.utils.PreviewAllWindows @Composable @OptIn(ExperimentalMaterial3Api::class) @@ -58,8 +57,7 @@ fun BrandTopAppBar() { ) } -@PreviewSmallWindow -@PreviewLargeWindow +@PreviewAllWindows @Composable private fun BrandTopAppBarPreview() { SwissTransferTheme { diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/FileItem.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/FileItem.kt index ed8883c2b..6be98e833 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/FileItem.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/FileItem.kt @@ -46,8 +46,7 @@ import com.infomaniak.swisstransfer.ui.theme.CustomShapes import com.infomaniak.swisstransfer.ui.theme.LocalIsDarkMode import com.infomaniak.swisstransfer.ui.theme.Margin import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme -import com.infomaniak.swisstransfer.ui.utils.PreviewLargeWindow -import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow +import com.infomaniak.swisstransfer.ui.utils.PreviewAllWindows import com.infomaniak.swisstransfer.ui.utils.fileType import com.infomaniak.swisstransfer.ui.utils.hasPreview @@ -196,8 +195,7 @@ private fun FileIcon(fileType: FileType) { } } -@PreviewSmallWindow -@PreviewLargeWindow +@PreviewAllWindows @Composable private fun FileItemPreview() { SwissTransferTheme { diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/FileItemList.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/FileItemList.kt index 8a7dbbbfd..35299de01 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/FileItemList.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/FileItemList.kt @@ -26,8 +26,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import com.infomaniak.swisstransfer.ui.theme.Margin import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme -import com.infomaniak.swisstransfer.ui.utils.PreviewLargeWindow -import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow +import com.infomaniak.swisstransfer.ui.utils.PreviewAllWindows @Composable fun FileItemList( @@ -58,8 +57,7 @@ fun FileItemList( } } -@PreviewSmallWindow -@PreviewLargeWindow +@PreviewAllWindows @Composable private fun FileItemListPreview() { val files = listOf(object : FileUiItem { diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTopAppBar.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTopAppBar.kt index b6f18d2f0..f8106f1e9 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTopAppBar.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTopAppBar.kt @@ -29,8 +29,7 @@ import com.infomaniak.swisstransfer.ui.images.icons.Add import com.infomaniak.swisstransfer.ui.images.icons.ArrowLeft import com.infomaniak.swisstransfer.ui.images.icons.Cross import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme -import com.infomaniak.swisstransfer.ui.utils.PreviewLargeWindow -import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow +import com.infomaniak.swisstransfer.ui.utils.PreviewAllWindows @Composable @OptIn(ExperimentalMaterial3Api::class) @@ -75,8 +74,7 @@ data class TopAppBarButton( } } -@PreviewSmallWindow -@PreviewLargeWindow +@PreviewAllWindows @Composable private fun SwissTransferTopAppBarPreview() { SwissTransferTheme { diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/MainScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/MainScreen.kt index b45e46d88..389076787 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/MainScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/MainScreen.kt @@ -28,8 +28,7 @@ import com.infomaniak.swisstransfer.ui.navigation.MainNavigation import com.infomaniak.swisstransfer.ui.navigation.NavigationDestination.Companion.toDestination import com.infomaniak.swisstransfer.ui.screen.main.components.MainScaffold import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme -import com.infomaniak.swisstransfer.ui.utils.PreviewLargeWindow -import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow +import com.infomaniak.swisstransfer.ui.utils.PreviewAllWindows @Composable fun MainScreen() { @@ -49,8 +48,7 @@ fun MainScreen() { ) } -@PreviewSmallWindow -@PreviewLargeWindow +@PreviewAllWindows @Composable private fun MainScreenPreview() { SwissTransferTheme { diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/received/ReceivedScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/received/ReceivedScreen.kt index 46e2ea386..1a2f21a73 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/received/ReceivedScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/received/ReceivedScreen.kt @@ -37,8 +37,7 @@ import com.infomaniak.swisstransfer.ui.screen.main.received.components.ReceivedE import com.infomaniak.swisstransfer.ui.screen.main.sent.SentViewModel import com.infomaniak.swisstransfer.ui.theme.Margin import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme -import com.infomaniak.swisstransfer.ui.utils.PreviewLargeWindow -import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow +import com.infomaniak.swisstransfer.ui.utils.PreviewAllWindows @Composable fun ReceivedScreen( @@ -104,8 +103,7 @@ private fun ReceivedScreen( } } -@PreviewSmallWindow -@PreviewLargeWindow +@PreviewAllWindows @Composable private fun ReceivedScreenPreview() { SwissTransferTheme { diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/sent/SentEmptyScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/sent/SentEmptyScreen.kt index dafa8336b..1d579916b 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/sent/SentEmptyScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/sent/SentEmptyScreen.kt @@ -35,8 +35,7 @@ import com.infomaniak.swisstransfer.ui.images.illus.ArrowDownRightCurved import com.infomaniak.swisstransfer.ui.theme.Dimens import com.infomaniak.swisstransfer.ui.theme.Margin import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme -import com.infomaniak.swisstransfer.ui.utils.PreviewLargeWindow -import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow +import com.infomaniak.swisstransfer.ui.utils.PreviewAllWindows @Composable fun SentEmptyScreen() { @@ -85,8 +84,7 @@ fun SentEmptyScreen() { } } -@PreviewSmallWindow -@PreviewLargeWindow +@PreviewAllWindows @Composable private fun SentEmptyScreenPreview() { SwissTransferTheme { 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 index 634e959dd..2ac1937b4 100644 --- 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 @@ -25,8 +25,7 @@ import com.infomaniak.swisstransfer.ui.components.FileItemList import com.infomaniak.swisstransfer.ui.components.FileUiItem import com.infomaniak.swisstransfer.ui.theme.Margin import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme -import com.infomaniak.swisstransfer.ui.utils.PreviewLargeWindow -import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow +import com.infomaniak.swisstransfer.ui.utils.PreviewAllWindows @Composable fun SentListScreen(transfers: List) { @@ -60,8 +59,7 @@ fun SentListScreen(transfers: List) { ) } -@PreviewSmallWindow -@PreviewLargeWindow +@PreviewAllWindows @Composable private fun SentListScreenPreview() { SwissTransferTheme { 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 84a9f7b88..57adb8c33 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 @@ -27,8 +27,7 @@ import com.infomaniak.swisstransfer.ui.components.NewTransferFab import com.infomaniak.swisstransfer.ui.components.NewTransferFabType import com.infomaniak.swisstransfer.ui.screen.main.components.BrandTopAppBarScaffold import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme -import com.infomaniak.swisstransfer.ui.utils.PreviewLargeWindow -import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow +import com.infomaniak.swisstransfer.ui.utils.PreviewAllWindows import com.infomaniak.swisstransfer.ui.utils.isWindowSmall @Composable @@ -61,8 +60,7 @@ private fun SentScreen(transfers: List?) { } } -@PreviewSmallWindow -@PreviewLargeWindow +@PreviewAllWindows @Composable private fun SentScreenPreview() { SwissTransferTheme { diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsDownloadsLimitScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsDownloadsLimitScreen.kt index 21d7dc8e9..68c42b695 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsDownloadsLimitScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsDownloadsLimitScreen.kt @@ -25,7 +25,7 @@ import com.infomaniak.swisstransfer.R import com.infomaniak.swisstransfer.ui.screen.main.settings.components.OptionScaffold import com.infomaniak.swisstransfer.ui.screen.main.settings.components.SettingOption import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme -import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow +import com.infomaniak.swisstransfer.ui.utils.PreviewAllWindows @Composable fun SettingsDownloadsLimitScreen( @@ -54,7 +54,7 @@ enum class DownloadLimitOption( ONE({ "1" }), } -@PreviewSmallWindow +@PreviewAllWindows @Composable private fun SettingsThemeScreenPreview() { SwissTransferTheme { diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsEmailLanguageScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsEmailLanguageScreen.kt index 68b2b944d..c6bd9cb82 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsEmailLanguageScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsEmailLanguageScreen.kt @@ -26,7 +26,7 @@ import com.infomaniak.swisstransfer.R import com.infomaniak.swisstransfer.ui.screen.main.settings.components.OptionScaffold import com.infomaniak.swisstransfer.ui.screen.main.settings.components.SettingOption import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme -import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow +import com.infomaniak.swisstransfer.ui.utils.PreviewAllWindows @Composable fun SettingsEmailLanguageScreen( @@ -56,7 +56,7 @@ enum class EmailLanguageOption( SPANISH({ stringResource(R.string.settingsEmailLanguageValueSpanish) }, imageVectorResId = R.drawable.flag_es), } -@PreviewSmallWindow +@PreviewAllWindows @Composable private fun SettingsThemeScreenPreview() { SwissTransferTheme { diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsScreen.kt index 9827fdcf6..70757eeae 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsScreen.kt @@ -47,7 +47,7 @@ import com.infomaniak.swisstransfer.ui.screen.main.settings.components.SettingTi import com.infomaniak.swisstransfer.ui.theme.Margin import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme import com.infomaniak.swisstransfer.ui.utils.GetSetCallbacks -import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow +import com.infomaniak.swisstransfer.ui.utils.PreviewAllWindows @Composable fun SettingsScreen( @@ -184,7 +184,7 @@ enum class SettingsOptionScreens { DISCOVER_INFOMANIAK, SHARE_IDEAS, GIVE_FEEDBACK, } -@PreviewSmallWindow +@PreviewAllWindows @Composable private fun SettingsScreenPreview() { SwissTransferTheme { 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 d62567528..ebb8ed197 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 @@ -167,8 +167,7 @@ private fun NoSelectionEmptyState() { } } -@PreviewSmallWindow -@PreviewLargeWindow +@PreviewAllWindows @Composable private fun SettingsScreenWrapperPreview() { SwissTransferTheme { diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsThemeScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsThemeScreen.kt index 1ba15baf4..9289b2db0 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsThemeScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsThemeScreen.kt @@ -30,7 +30,7 @@ import com.infomaniak.swisstransfer.ui.images.icons.CircleWhite import com.infomaniak.swisstransfer.ui.screen.main.settings.components.OptionScaffold import com.infomaniak.swisstransfer.ui.screen.main.settings.components.SettingOption import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme -import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow +import com.infomaniak.swisstransfer.ui.utils.PreviewAllWindows @Composable fun SettingsThemeScreen( @@ -58,7 +58,7 @@ enum class ThemeOption( DARK({ stringResource(R.string.settingsOptionThemeDark) }, AppIcons.CircleBlack), } -@PreviewSmallWindow +@PreviewAllWindows @Composable private fun SettingsThemeScreenPreview() { SwissTransferTheme { diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsValidityPeriodScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsValidityPeriodScreen.kt index 71a463ef9..07880b583 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsValidityPeriodScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsValidityPeriodScreen.kt @@ -26,7 +26,7 @@ import com.infomaniak.swisstransfer.R import com.infomaniak.swisstransfer.ui.screen.main.settings.components.OptionScaffold import com.infomaniak.swisstransfer.ui.screen.main.settings.components.SettingOption import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme -import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow +import com.infomaniak.swisstransfer.ui.utils.PreviewAllWindows @Composable fun SettingsValidityPeriodScreen( @@ -55,7 +55,7 @@ enum class ValidityPeriodOption( ONE({ pluralStringResource(R.plurals.settingsValidityPeriodValue, 1, 1) }), } -@PreviewSmallWindow +@PreviewAllWindows @Composable private fun SettingsThemeScreenPreview() { SwissTransferTheme { 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 e9f8fcd33..defed04a6 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 @@ -33,8 +33,7 @@ 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 import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme -import com.infomaniak.swisstransfer.ui.utils.PreviewLargeWindow -import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow +import com.infomaniak.swisstransfer.ui.utils.PreviewAllWindows @Composable fun OptionScaffold( @@ -64,8 +63,7 @@ fun OptionScaffold( } } -@PreviewSmallWindow -@PreviewLargeWindow +@PreviewAllWindows @Composable private fun OptionScaffoldPreview() { SwissTransferTheme { diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/NewTransferScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/NewTransferScreen.kt index 3b775e7ef..e12920249 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/NewTransferScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/NewTransferScreen.kt @@ -20,8 +20,7 @@ package com.infomaniak.swisstransfer.ui.screen.newtransfer import androidx.compose.runtime.Composable import androidx.navigation.compose.rememberNavController import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme -import com.infomaniak.swisstransfer.ui.utils.PreviewLargeWindow -import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow +import com.infomaniak.swisstransfer.ui.utils.PreviewAllWindows @Composable fun NewTransferScreen(closeActivity: () -> Unit) { @@ -29,8 +28,7 @@ fun NewTransferScreen(closeActivity: () -> Unit) { NewTransferNavHost(navController, closeActivity) } -@PreviewSmallWindow -@PreviewLargeWindow +@PreviewAllWindows @Composable private fun NewTransferPreview() { SwissTransferTheme { 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 ba400fa79..d447b48b6 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,8 +36,7 @@ import com.infomaniak.swisstransfer.ui.images.illus.MascotWithMagnifyingGlass import com.infomaniak.swisstransfer.ui.screen.newtransfer.NewTransferViewModel import com.infomaniak.swisstransfer.ui.screen.newtransfer.TransferFile import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme -import com.infomaniak.swisstransfer.ui.utils.PreviewLargeWindow -import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow +import com.infomaniak.swisstransfer.ui.utils.PreviewAllWindows @Composable fun ImportFilesScreen( @@ -114,11 +113,15 @@ private fun ImportFilesScreen( ) } -@PreviewSmallWindow -@PreviewLargeWindow +@PreviewAllWindows @Composable private fun ImportFilesScreenPreview() { SwissTransferTheme { - ImportFilesScreen({ emptyList() }, {}, navigateToTransferTypeScreen = {}, closeActivity = {}) + ImportFilesScreen( + transferFiles = { emptyList() }, + addFiles = {}, + navigateToTransferTypeScreen = {}, + closeActivity = {}, + ) } } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/UploadSourceChoiceBottomSheet.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/UploadSourceChoiceBottomSheet.kt index 7c762f125..f250c329f 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/UploadSourceChoiceBottomSheet.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/UploadSourceChoiceBottomSheet.kt @@ -32,8 +32,7 @@ import com.infomaniak.swisstransfer.ui.images.icons.Folder import com.infomaniak.swisstransfer.ui.images.icons.PolaroidLandscape import com.infomaniak.swisstransfer.ui.theme.Margin import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme -import com.infomaniak.swisstransfer.ui.utils.PreviewLargeWindow -import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow +import com.infomaniak.swisstransfer.ui.utils.PreviewAllWindows @Composable fun UploadSourceChoiceBottomSheet( @@ -79,8 +78,7 @@ fun UploadSourceChoiceBottomSheet( } } -@PreviewSmallWindow -@PreviewLargeWindow +@PreviewAllWindows @Composable private fun UploadSourceChoiceBottomSheetPreview() { SwissTransferTheme { @@ -88,7 +86,7 @@ private fun UploadSourceChoiceBottomSheetPreview() { UploadSourceChoiceBottomSheet( isBottomSheetVisible = { true }, onFilePickerClicked = {}, - closeBottomSheet = {} + closeBottomSheet = {}, ) } }