Add dock rows setting to choose how many rows to display on the home screen (#1520)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user