mirror of
https://github.com/jrpie/Launcher.git
synced 2025-02-23 06:21:31 +01:00
fix: hide µLauncher by default
This commit is contained in:
parent
3ae2e36ee0
commit
7f2a52c79c
2 changed files with 13 additions and 13 deletions
|
@ -418,18 +418,18 @@ fun resetPreferences(context: Context) {
|
|||
LauncherPreferences.clear()
|
||||
LauncherPreferences.internal().versionCode(PREFERENCE_VERSION)
|
||||
|
||||
LauncherPreferences.apps().hidden(
|
||||
LauncherPreferences.apps().hidden()?.also {
|
||||
it.add(
|
||||
DetailedAppInfo.fromAppInfo(
|
||||
|
||||
val hidden: MutableSet<AppInfo> = mutableSetOf()
|
||||
val launcher = DetailedAppInfo.fromAppInfo(
|
||||
AppInfo(
|
||||
BuildConfig.APPLICATION_ID,
|
||||
HomeActivity::class.java.name,
|
||||
AppInfo.INVALID_USER
|
||||
), context
|
||||
)?.app
|
||||
)
|
||||
})
|
||||
launcher?.app?.let { hidden.add(it) }
|
||||
Log.i(TAG,"Hiding ${launcher?.app}")
|
||||
LauncherPreferences.apps().hidden(hidden)
|
||||
|
||||
Action.resetToDefaultActions(context)
|
||||
}
|
||||
|
|
|
@ -168,7 +168,7 @@ class AppsRecyclerAdapter(
|
|||
}
|
||||
|
||||
R.id.app_menu_hidden -> {
|
||||
var hidden: MutableSet<AppInfo> =
|
||||
val hidden: MutableSet<AppInfo> =
|
||||
LauncherPreferences.apps().hidden() ?: mutableSetOf()
|
||||
if (hidden.contains(appInfo.app)) {
|
||||
hidden.remove(appInfo.app)
|
||||
|
|
Loading…
Add table
Reference in a new issue