Skip to content

Commit

Permalink
Rename SmallWindowTopAppBarScaffold into PhoneTopAppBarScaffold
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed Sep 24, 2024
1 parent 0aa5a57 commit fb63a8d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ fun BrandTobAppBarScaffold(
floatingActionButton: @Composable () -> Unit = {},
content: @Composable (PaddingValues) -> Unit,
) {
SmallWindowTopAppBarScaffold(
topBar = { BrandTobAppBar() },
PhoneTopAppBarScaffold(
phoneTopAppBar = { BrandTobAppBar() },
floatingActionButton = floatingActionButton,
content = content,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private fun SentScreen(navType: NavigationSuiteType, transfers: List<Any>?) {

BrandTobAppBarScaffold(
floatingActionButton = {
if (navType == NavigationSuiteType.NavigationBar && !transfers.isNullOrEmpty()) {
if (navType == NavigationSuiteType.NavigationBar && transfers.isNotEmpty()) {
NewTransferFab(newTransferFabType = NewTransferFabType.BOTTOM_BAR)
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down

0 comments on commit fb63a8d

Please sign in to comment.