mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 15:26:58 +00:00
Move deck layout mode to experimental features
Fixes #5563 Around 30 minutes of work.
This commit is contained in:
@@ -184,6 +184,9 @@
|
||||
<string name="icon_swipe_gestures">Icon swipe gestures</string>
|
||||
<string name="icon_swipe_gestures_description">Perform actions when swiping left or right on icons instead of moving the home screen</string>
|
||||
|
||||
<string name="show_deck_layout">Deck layout</string>
|
||||
<string name="show_deck_layout_description">Show a layout option to hide the app drawer and automatically add new apps to the home screen</string>
|
||||
|
||||
<string name="recents_lock_unlock">Lock/unlock</string>
|
||||
<string name="recents_lock_unlock_description">Prevent selected app from closing when pressing \"Clear all\"</string>
|
||||
|
||||
|
||||
@@ -679,6 +679,11 @@ class PreferenceManager2 private constructor(private val context: Context) :
|
||||
onSet = { reloadHelper.reloadIcons() },
|
||||
)
|
||||
|
||||
val showDeckLayout = preference(
|
||||
key = booleanPreferencesKey(name = "show_deck_layout"),
|
||||
defaultValue = false,
|
||||
)
|
||||
|
||||
val enableLabelInDock = preference(
|
||||
key = booleanPreferencesKey(name = "enable_label_dock"),
|
||||
defaultValue = false,
|
||||
|
||||
@@ -51,6 +51,11 @@ fun ExperimentalFeaturesPreferences(
|
||||
label = stringResource(R.string.icon_swipe_gestures),
|
||||
description = stringResource(R.string.icon_swipe_gestures_description),
|
||||
)
|
||||
SwitchPreference(
|
||||
adapter = prefs2.showDeckLayout.getAdapter(),
|
||||
label = stringResource(R.string.show_deck_layout),
|
||||
description = stringResource(R.string.show_deck_layout_description),
|
||||
)
|
||||
|
||||
val enableWallpaperBlur = prefs.enableWallpaperBlur.getAdapter()
|
||||
|
||||
|
||||
@@ -67,8 +67,11 @@ fun HomeScreenPreferences(
|
||||
modifier = modifier,
|
||||
) {
|
||||
val lockHomeScreenAdapter = prefs2.lockHomeScreen.getAdapter()
|
||||
val showDeckLayout = prefs2.showDeckLayout.getAdapter().state.value
|
||||
|
||||
HomeLayoutSettings()
|
||||
if (showDeckLayout) {
|
||||
HomeLayoutSettings()
|
||||
}
|
||||
|
||||
PreferenceGroup(heading = stringResource(id = R.string.general_label)) {
|
||||
val addIconToHomeAdapter = prefs.addIconToHome.getAdapter()
|
||||
|
||||
Reference in New Issue
Block a user