hide µLauncher by default

This commit is contained in:
Josia Pietsch 2024-11-18 19:37:33 +01:00
parent aba23c370b
commit 70e35db394
Signed by: jrpie
GPG key ID: E70B571D66986A2D

View file

@ -3,9 +3,13 @@ package de.jrpie.android.launcher.preferences
import android.content.Context
import android.content.SharedPreferences
import android.util.Log
import de.jrpie.android.launcher.BuildConfig
import de.jrpie.android.launcher.actions.Action
import de.jrpie.android.launcher.apps.AppInfo
import de.jrpie.android.launcher.apps.DetailedAppInfo
import de.jrpie.android.launcher.preferences.theme.Background
import de.jrpie.android.launcher.preferences.theme.ColorTheme
import de.jrpie.android.launcher.ui.HomeActivity
/* Current version of the structure of preferences.
* Increase when breaking changes are introduced and write an appropriate case in
@ -414,5 +418,18 @@ fun resetPreferences(context: Context) {
LauncherPreferences.clear()
LauncherPreferences.internal().versionCode(PREFERENCE_VERSION)
LauncherPreferences.apps().hidden(
LauncherPreferences.apps().hidden().also {
it.add(
DetailedAppInfo.fromAppInfo(
AppInfo(
BuildConfig.APPLICATION_ID,
HomeActivity::class.java.name,
AppInfo.INVALID_USER
), context
)?.app
)
})
Action.resetToDefaultActions(context)
}