Add preference to hide hidden items button
This commit is contained in:
@@ -22,7 +22,7 @@ internal val Context.dataStore: LauncherDataStore by dataStore(
|
||||
}
|
||||
)
|
||||
|
||||
internal const val SchemaVersion = 14
|
||||
internal const val SchemaVersion = 15
|
||||
|
||||
internal fun getMigrations(context: Context): List<DataMigration<Settings>> {
|
||||
return listOf(
|
||||
@@ -40,5 +40,6 @@ internal fun getMigrations(context: Context): List<DataMigration<Settings>> {
|
||||
Migration_11_12(),
|
||||
Migration_12_13(),
|
||||
Migration_13_14(),
|
||||
Migration_14_15(),
|
||||
)
|
||||
}
|
||||
@@ -136,6 +136,7 @@ fun createFactorySettings(context: Context): Settings {
|
||||
.setAutoFocus(true)
|
||||
.setLaunchOnEnter(true)
|
||||
.setColor(SearchBarColors.Auto)
|
||||
.setHiddenItemsButton(true)
|
||||
.build()
|
||||
)
|
||||
.setIcons(
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package de.mm20.launcher2.preferences.migrations
|
||||
|
||||
import de.mm20.launcher2.preferences.Settings
|
||||
|
||||
class Migration_14_15: VersionedMigration(14, 15) {
|
||||
override suspend fun applyMigrations(builder: Settings.Builder): Settings.Builder {
|
||||
return builder.setSearchBar(
|
||||
builder.searchBar.toBuilder()
|
||||
.setHiddenItemsButton(true)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -225,6 +225,7 @@ message Settings {
|
||||
}
|
||||
SearchBarColors color = 3;
|
||||
bool launch_on_enter = 4;
|
||||
bool hidden_items_button = 5;
|
||||
}
|
||||
SearchBarSettings search_bar = 20;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user