From fb63a8db66d8db6a7a2312841596a7350469bdd3 Mon Sep 17 00:00:00 2001 From: Kevin Boulongne Date: Tue, 24 Sep 2024 15:11:07 +0200 Subject: [PATCH] Rename SmallWindowTopAppBarScaffold into PhoneTopAppBarScaffold --- .../ui/screen/main/components/BrandTobAppBarScaffold.kt | 4 ++-- ...WindowTopAppBarScaffold.kt => PhoneTopAppBarScaffold.kt} | 6 +++--- .../swisstransfer/ui/screen/main/sent/SentScreen.kt | 2 +- .../ui/screen/main/settings/components/OptionScaffold.kt | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) rename app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/{SmallWindowTopAppBarScaffold.kt => PhoneTopAppBarScaffold.kt} (92%) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/BrandTobAppBarScaffold.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/BrandTobAppBarScaffold.kt index fb5f36774..4d1049423 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/BrandTobAppBarScaffold.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/BrandTobAppBarScaffold.kt @@ -26,8 +26,8 @@ fun BrandTobAppBarScaffold( floatingActionButton: @Composable () -> Unit = {}, content: @Composable (PaddingValues) -> Unit, ) { - SmallWindowTopAppBarScaffold( - topBar = { BrandTobAppBar() }, + PhoneTopAppBarScaffold( + phoneTopAppBar = { BrandTobAppBar() }, floatingActionButton = floatingActionButton, content = content, ) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/SmallWindowTopAppBarScaffold.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/PhoneTopAppBarScaffold.kt similarity index 92% rename from app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/SmallWindowTopAppBarScaffold.kt rename to app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/PhoneTopAppBarScaffold.kt index a0e2790d7..b4ce72fc0 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/SmallWindowTopAppBarScaffold.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/PhoneTopAppBarScaffold.kt @@ -23,13 +23,13 @@ import androidx.compose.material3.adaptive.navigationsuite.NavigationSuiteType import androidx.compose.runtime.Composable @Composable -fun SmallWindowTopAppBarScaffold( - topBar: @Composable () -> Unit = {}, +fun PhoneTopAppBarScaffold( + phoneTopAppBar: @Composable () -> Unit = {}, floatingActionButton: @Composable () -> Unit = {}, content: @Composable (PaddingValues) -> Unit, ) { Scaffold( - topBar = { if (LocalNavType.current == NavigationSuiteType.NavigationBar) topBar() }, + topBar = { if (LocalNavType.current == NavigationSuiteType.NavigationBar) phoneTopAppBar() }, floatingActionButton = floatingActionButton, ) { contentPadding -> content(contentPadding) 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 4d77c0b69..f9afa22af 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 @@ -50,7 +50,7 @@ private fun SentScreen(navType: NavigationSuiteType, transfers: List?) { BrandTobAppBarScaffold( floatingActionButton = { - if (navType == NavigationSuiteType.NavigationBar && !transfers.isNullOrEmpty()) { + if (navType == NavigationSuiteType.NavigationBar && transfers.isNotEmpty()) { NewTransferFab(newTransferFabType = NewTransferFabType.BOTTOM_BAR) } }, 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 46e4a4f95..5ac4583f1 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,7 +33,7 @@ import com.infomaniak.swisstransfer.R import com.infomaniak.swisstransfer.ui.components.SwissTransferTobAppBar import com.infomaniak.swisstransfer.ui.components.TopAppBarButton import com.infomaniak.swisstransfer.ui.screen.main.components.LocalNavType -import com.infomaniak.swisstransfer.ui.screen.main.components.SmallWindowTopAppBarScaffold +import com.infomaniak.swisstransfer.ui.screen.main.components.PhoneTopAppBarScaffold import com.infomaniak.swisstransfer.ui.screen.main.settings.ThemeOption import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme import com.infomaniak.swisstransfer.ui.utils.PreviewMobile @@ -48,8 +48,8 @@ fun OptionScaffold( setSelectedSettingOptionPosition: (Int) -> Unit, navigateBack: (() -> Unit)? = null, ) { - SmallWindowTopAppBarScaffold( - topBar = { + PhoneTopAppBarScaffold( + phoneTopAppBar = { val navigationMenu = if (LocalNavType.current == NavigationSuiteType.NavigationBar) { TopAppBarButton.backButton(navigateBack ?: {}) } else {