Skip to content

Commit

Permalink
Rename SwissTransferTobAppBar into SwissTransferTopAppBar
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed Sep 25, 2024
1 parent 81a9be1 commit 605273e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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) {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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() },
Expand Down

0 comments on commit 605273e

Please sign in to comment.