Skip to content

Commit

Permalink
Rename BrandTobAppBar into BrandTopAppBar
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed Sep 25, 2024
1 parent 659bd9a commit 71e1b17
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow

@Composable
@OptIn(ExperimentalMaterial3Api::class)
fun BrandTobAppBar() {
fun BrandTopAppBar() {
CenterAlignedTopAppBar(
colors = TopAppBarDefaults.topAppBarColors(
containerColor = SwissTransferTheme.materialColors.tertiary,
Expand All @@ -61,8 +61,8 @@ fun BrandTobAppBar() {
@PreviewSmallWindow
@PreviewLargeWindow
@Composable
private fun BrandTobAppBarPreview() {
private fun BrandTopAppBarPreview() {
SwissTransferTheme {
BrandTobAppBar()
BrandTopAppBar()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.navigation.compose.currentBackStackEntryAsState
import androidx.navigation.compose.rememberNavController
import com.infomaniak.swisstransfer.ui.components.BrandTobAppBar
import com.infomaniak.swisstransfer.ui.components.BrandTopAppBar
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
Expand All @@ -44,7 +44,7 @@ fun MainScreen() {
MainScaffold(
navController = navController,
currentDestination = currentDestination,
largeWindowTopAppBar = { BrandTobAppBar() },
largeWindowTopAppBar = { BrandTopAppBar() },
content = { MainNavHost(navController, currentDestination) },
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ package com.infomaniak.swisstransfer.ui.screen.main.components

import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.runtime.Composable
import com.infomaniak.swisstransfer.ui.components.BrandTobAppBar
import com.infomaniak.swisstransfer.ui.components.BrandTopAppBar

@Composable
fun BrandTobAppBarScaffold(
fun BrandTopAppBarScaffold(
floatingActionButton: @Composable () -> Unit = {},
content: @Composable (PaddingValues) -> Unit,
) {
SmallWindowTopAppBarScaffold(
smallWindowTopAppBar = { BrandTobAppBar() },
smallWindowTopAppBar = { BrandTopAppBar() },
floatingActionButton = floatingActionButton,
content = content,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.navigation.NavGraph.Companion.findStartDestination
import androidx.navigation.NavHostController
import com.infomaniak.swisstransfer.ui.components.BrandTobAppBar
import com.infomaniak.swisstransfer.ui.components.BrandTopAppBar
import com.infomaniak.swisstransfer.ui.navigation.MainNavigation
import com.infomaniak.swisstransfer.ui.navigation.NavigationItem
import com.infomaniak.swisstransfer.ui.theme.LocalWindowAdaptiveInfo
Expand Down Expand Up @@ -122,7 +122,7 @@ private fun NavigationSmallWindowPreview() {
currentDestination = MainNavigation.SentDestination,
navigateToSelectedItem = {},
navType = NavigationSuiteType.NavigationBar,
largeWindowTopAppBar = { BrandTobAppBar() },
largeWindowTopAppBar = { BrandTopAppBar() },
content = {},
)
}
Expand All @@ -136,7 +136,7 @@ private fun NavigationLargeWindowPreview() {
currentDestination = MainNavigation.SentDestination,
navigateToSelectedItem = {},
navType = NavigationSuiteType.NavigationRail,
largeWindowTopAppBar = { BrandTobAppBar() },
largeWindowTopAppBar = { BrandTopAppBar() },
content = {},
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import com.infomaniak.swisstransfer.R
import com.infomaniak.swisstransfer.ui.components.EmptyState
import com.infomaniak.swisstransfer.ui.images.AppImages.AppIllus
import com.infomaniak.swisstransfer.ui.images.illus.MascotSearching
import com.infomaniak.swisstransfer.ui.screen.main.components.BrandTobAppBarScaffold
import com.infomaniak.swisstransfer.ui.screen.main.components.BrandTopAppBarScaffold
import com.infomaniak.swisstransfer.ui.screen.main.received.components.ReceivedEmptyFab
import com.infomaniak.swisstransfer.ui.screen.main.sent.SentViewModel
import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme
Expand All @@ -50,7 +50,7 @@ fun ReceivedScreen(

@Composable
private fun ReceivedScreen(areTransfersEmpty: () -> Boolean) {
BrandTobAppBarScaffold(
BrandTopAppBarScaffold(
floatingActionButton = { ReceivedEmptyFab(areTransfersEmpty) },
) { contentPadding ->
EmptyState(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import androidx.hilt.navigation.compose.hiltViewModel
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.infomaniak.swisstransfer.ui.components.NewTransferFab
import com.infomaniak.swisstransfer.ui.components.NewTransferFabType
import com.infomaniak.swisstransfer.ui.screen.main.components.BrandTobAppBarScaffold
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
Expand All @@ -48,7 +48,7 @@ private fun SentScreen(transfers: List<Any>?) {
if (transfers == null) return
val windowAdaptiveInfo = currentWindowAdaptiveInfo()

BrandTobAppBarScaffold(
BrandTopAppBarScaffold(
floatingActionButton = {
if (windowAdaptiveInfo.isWindowSmall() && transfers.isNotEmpty()) {
NewTransferFab(newTransferFabType = NewTransferFabType.BOTTOM_BAR)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import com.infomaniak.swisstransfer.BuildConfig
import com.infomaniak.swisstransfer.R
import com.infomaniak.swisstransfer.ui.images.AppImages.AppIcons
import com.infomaniak.swisstransfer.ui.images.icons.*
import com.infomaniak.swisstransfer.ui.screen.main.components.BrandTobAppBarScaffold
import com.infomaniak.swisstransfer.ui.screen.main.components.BrandTopAppBarScaffold
import com.infomaniak.swisstransfer.ui.screen.main.settings.SettingsOptionScreens.*
import com.infomaniak.swisstransfer.ui.screen.main.settings.components.EndIconType.CHEVRON
import com.infomaniak.swisstransfer.ui.screen.main.settings.components.EndIconType.OPEN_OUTSIDE
Expand All @@ -57,7 +57,7 @@ fun SettingsScreen(
) {
val selectedSetting = getSelectedSetting()

BrandTobAppBarScaffold { paddingsValue ->
BrandTopAppBarScaffold { paddingsValue ->
Column(
modifier = Modifier
.verticalScroll(rememberScrollState())
Expand Down

0 comments on commit 71e1b17

Please sign in to comment.