Skip to content

Commit

Permalink
Remove now unnecessary window size check for TopAppBar backNavigation
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed Sep 24, 2024
1 parent fb63a8d commit 5a86860
Showing 1 changed file with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.adaptive.navigationsuite.NavigationSuiteType
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableIntStateOf
Expand All @@ -32,7 +31,6 @@ import androidx.compose.ui.Modifier
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.PhoneTopAppBarScaffold
import com.infomaniak.swisstransfer.ui.screen.main.settings.ThemeOption
import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme
Expand All @@ -46,17 +44,10 @@ fun OptionScaffold(
enumEntries: List<SettingOption>,
selectedSettingOptionPosition: Int,
setSelectedSettingOptionPosition: (Int) -> Unit,
navigateBack: (() -> Unit)? = null,
navigateBack: (() -> Unit)?,
) {
PhoneTopAppBarScaffold(
phoneTopAppBar = {
val navigationMenu = if (LocalNavType.current == NavigationSuiteType.NavigationBar) {
TopAppBarButton.backButton(navigateBack ?: {})
} else {
null
}
SwissTransferTobAppBar(topAppBarTitleRes, navigationMenu)
},
phoneTopAppBar = { SwissTransferTobAppBar(topAppBarTitleRes, TopAppBarButton.backButton(navigateBack ?: {})) },
) { paddingsValue ->
Column(
modifier = Modifier
Expand Down

0 comments on commit 5a86860

Please sign in to comment.