Fix back button for screens in large screen devices

This commit is contained in:
SuperDragonXD
2024-07-09 20:45:15 +08:00
parent c817ae512d
commit 5913dd3920
4 changed files with 5 additions and 3 deletions
@@ -118,7 +118,7 @@ fun CreateBackupScreen(
PreferenceLayout(
label = stringResource(id = R.string.create_backup),
modifier = modifier,
backArrowVisible = LocalIsExpandedScreen.current,
backArrowVisible = !LocalIsExpandedScreen.current,
scrollState = if (isPortrait) null else scrollState,
) {
DisposableEffect(contents, hasLiveWallpaper, hasStoragePermission) {
@@ -91,7 +91,7 @@ fun RestoreBackupScreen(
PreferenceLayout(
label = stringResource(id = R.string.restore_backup),
modifier = modifier,
backArrowVisible = LocalIsExpandedScreen.current,
backArrowVisible = !LocalIsExpandedScreen.current,
scrollState = if (isPortrait) null else scrollState,
) {
when (uiState) {
@@ -216,7 +216,7 @@ fun About(
PreferenceLayout(
label = stringResource(id = R.string.about_label),
modifier = modifier,
backArrowVisible = LocalIsExpandedScreen.current,
backArrowVisible = !LocalIsExpandedScreen.current,
horizontalAlignment = Alignment.CenterHorizontally,
) {
Column(
@@ -11,6 +11,7 @@ import app.lawnchair.preferences.getAdapter
import app.lawnchair.preferences.preferenceManager
import app.lawnchair.preferences2.PreferenceManager2
import app.lawnchair.preferences2.preferenceManager2
import app.lawnchair.ui.preferences.LocalIsExpandedScreen
import app.lawnchair.ui.preferences.components.controls.ClickablePreference
import app.lawnchair.ui.preferences.components.controls.MainSwitchPreference
import app.lawnchair.ui.preferences.components.controls.SwitchPreference
@@ -39,6 +40,7 @@ fun DebugMenuPreferences(
PreferenceLayout(
label = "Debug menu",
backArrowVisible = !LocalIsExpandedScreen.current,
modifier = modifier,
) {
MainSwitchPreference(adapter = enableDebug, label = "Show debug menu") {