mirror of
https://github.com/jrpie/Launcher.git
synced 2025-02-23 14:31:30 +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.clear()
|
||||||
LauncherPreferences.internal().versionCode(PREFERENCE_VERSION)
|
LauncherPreferences.internal().versionCode(PREFERENCE_VERSION)
|
||||||
|
|
||||||
LauncherPreferences.apps().hidden(
|
|
||||||
LauncherPreferences.apps().hidden()?.also {
|
val hidden: MutableSet<AppInfo> = mutableSetOf()
|
||||||
it.add(
|
val launcher = DetailedAppInfo.fromAppInfo(
|
||||||
DetailedAppInfo.fromAppInfo(
|
|
||||||
AppInfo(
|
AppInfo(
|
||||||
BuildConfig.APPLICATION_ID,
|
BuildConfig.APPLICATION_ID,
|
||||||
HomeActivity::class.java.name,
|
HomeActivity::class.java.name,
|
||||||
AppInfo.INVALID_USER
|
AppInfo.INVALID_USER
|
||||||
), context
|
), context
|
||||||
)?.app
|
|
||||||
)
|
)
|
||||||
})
|
launcher?.app?.let { hidden.add(it) }
|
||||||
|
Log.i(TAG,"Hiding ${launcher?.app}")
|
||||||
|
LauncherPreferences.apps().hidden(hidden)
|
||||||
|
|
||||||
Action.resetToDefaultActions(context)
|
Action.resetToDefaultActions(context)
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,7 +168,7 @@ class AppsRecyclerAdapter(
|
||||||
}
|
}
|
||||||
|
|
||||||
R.id.app_menu_hidden -> {
|
R.id.app_menu_hidden -> {
|
||||||
var hidden: MutableSet<AppInfo> =
|
val hidden: MutableSet<AppInfo> =
|
||||||
LauncherPreferences.apps().hidden() ?: mutableSetOf()
|
LauncherPreferences.apps().hidden() ?: mutableSetOf()
|
||||||
if (hidden.contains(appInfo.app)) {
|
if (hidden.contains(appInfo.app)) {
|
||||||
hidden.remove(appInfo.app)
|
hidden.remove(appInfo.app)
|
||||||
|
|
Loading…
Add table
Reference in a new issue