Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename SwissTransferTobAppBar into SwissTransferTopAppBar #77

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading