feat : Add setting to toggle app version visibility in grid popup (#1843)
* Add gridAppVersion setting and wiring * Implement app version visibility toggle in grid popup * Add hideAppDetails setting and wiring * feat : add hideAppDetails toggle and remove gridShowAppVersion
This commit is contained in:
@@ -628,6 +628,8 @@
|
||||
<string name="preference_search_favorites_summary">Show pinned and frequently used items above app grid</string>
|
||||
<string name="preference_search_apps">Apps</string>
|
||||
<string name="preference_search_apps_summary">Show all apps when the search field is empty</string>
|
||||
<string name="preference_search_apps_hide_details">Hide app details</string>
|
||||
<string name="preference_search_apps_hide_details_summary">When enabled, long-pressing an app item will not show its version and package name</string>
|
||||
<string name="preference_search_files">Files</string>
|
||||
<string name="preference_search_files_summary">Search local files and cloud files</string>
|
||||
<string name="preference_search_contacts">Contacts</string>
|
||||
|
||||
@@ -72,6 +72,7 @@ data class LauncherSettingsData internal constructor(
|
||||
val favoritesCompactTags: Boolean = false,
|
||||
|
||||
val searchAllApps: Boolean = true,
|
||||
val hideAppDetails: Boolean = false,
|
||||
|
||||
val fileSearchProviders: Set<String> = setOf("local"),
|
||||
|
||||
|
||||
@@ -70,4 +70,13 @@ class SearchUiSettings internal constructor(
|
||||
}
|
||||
}
|
||||
|
||||
val hideAppDetails
|
||||
get() = launcherDataStore.data.map { it.hideAppDetails }.distinctUntilChanged()
|
||||
|
||||
fun setHideAppDetails(hideAppDetails: Boolean) {
|
||||
launcherDataStore.update {
|
||||
it.copy(hideAppDetails = hideAppDetails)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user