Add preference to hide hidden items button
This commit is contained in:
@@ -650,6 +650,8 @@
|
||||
<string name="preference_search_bar_launch_on_enter_summary">Launch highlighted match or quick action upon tapping go</string>
|
||||
<string name="preference_hidden_items">Hidden search results</string>
|
||||
<string name="preference_hidden_items_summary">Manage hidden apps and search results</string>
|
||||
<string name="preference_hidden_items_reveal_button">Show reveal button</string>
|
||||
<string name="preference_hidden_items_reveal_button_summary">Show a button to reveal hidden search results</string>
|
||||
<string name="preference_screen_tags">Tags</string>
|
||||
<string name="preference_screen_tags_summary">Manage tags and tagged items</string>
|
||||
<string name="preference_wikipedia_customurl">Wikipedia URL</string>
|
||||
|
||||
@@ -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