Add dock rows setting to choose how many rows to display on the home screen (#1520)

This commit is contained in:
André
2025-10-18 14:14:45 +02:00
committed by GitHub
parent 496ca97dc8
commit a9b1ad2b40
7 changed files with 38 additions and 4 deletions

View File

@@ -56,6 +56,7 @@ data class LauncherSettingsData internal constructor(
val clockWidgetAlignment: ClockWidgetAlignment = ClockWidgetAlignment.Bottom,
val homeScreenDock: Boolean = false,
val homeScreenDockRows: Int = 1,
val homeScreenWidgets: Boolean = false,
val favoritesEnabled: Boolean = true,

View File

@@ -357,6 +357,17 @@ class UiSettings internal constructor(
}
}
val dockRows
get() = launcherDataStore.data.map {
it.homeScreenDockRows
}.distinctUntilChanged()
fun setDockRows(rows: Int) {
launcherDataStore.update {
it.copy(homeScreenDockRows = rows)
}
}
val homeScreenWidgets
get() = launcherDataStore.data.map {
it.homeScreenWidgets