Skip to content

Commit

Permalink
Fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
tevincent committed Aug 27, 2024
1 parent 96bdd4c commit d2b7480
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.stringResource
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.settings.components.SettingOption
import com.infomaniak.swisstransfer.ui.screen.main.settings.components.SettingTitle
import com.infomaniak.swisstransfer.ui.screen.main.settings.components.SingleSelectOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,14 @@ private fun DetailPane(navigator: ThreePaneScaffoldNavigator<SettingsOptionScree
val destination = navigator.currentDestination?.content ?: lastSelectedScreen
navigator.currentDestination?.content?.let { lastSelectedScreen = it }

val navigateBackCallback: () -> Unit = { navigator.navigateBack() }
val navigateBack: (() -> Unit)? = if (navigator.canNavigateBack()) navigateBackCallback else null

when (destination) {
THEME -> SettingsThemeScreen()
VALIDITY_PERIOD -> SettingsValidityPeriodScreen()
DOWNLOAD_LIMIT -> SettingsDownloadsLimitScreen()
EMAIL_LANGUAGE -> SettingsEmailLanguageScreen()
THEME -> SettingsThemeScreen(navigateBack)
VALIDITY_PERIOD -> SettingsValidityPeriodScreen(navigateBack)
DOWNLOAD_LIMIT -> SettingsDownloadsLimitScreen(navigateBack)
EMAIL_LANGUAGE -> SettingsEmailLanguageScreen(navigateBack)
NOTIFICATIONS,
DISCOVER_INFOMANIAK,
SHARE_IDEAS,
Expand Down

0 comments on commit d2b7480

Please sign in to comment.