mirror of
https://github.com/jrpie/Launcher.git
synced 2025-02-23 06:21:31 +01:00
parent
d16c20f5a6
commit
f4a590f373
2 changed files with 7 additions and 3 deletions
|
@ -56,6 +56,7 @@ const val PREF_WALLPAPER = "background_uri"
|
|||
const val PREF_THEME = "theme"
|
||||
|
||||
const val PREF_SCREEN_TIMEOUT_DISABLED = "disableTimeout"
|
||||
const val PREF_SEARCH_AUTO_LAUNCH = "searchAutoLaunch"
|
||||
|
||||
const val PREF_STARTED = "startedBefore"
|
||||
const val PREF_STARTED_TIME = "firstStartup"
|
||||
|
@ -358,6 +359,7 @@ fun resetSettings(context: Context) {
|
|||
.putInt(PREF_VIBRANT, vibrantColor)
|
||||
.putString(PREF_THEME, "finn")
|
||||
.putBoolean(PREF_SCREEN_TIMEOUT_DISABLED, false)
|
||||
.putBoolean(PREF_SEARCH_AUTO_LAUNCH, false)
|
||||
|
||||
// load action defaults
|
||||
for (actionKey in ACTIONS)
|
||||
|
|
|
@ -167,9 +167,11 @@ class AppsRecyclerAdapter(val activity: Activity,
|
|||
}
|
||||
}
|
||||
|
||||
// Launch apps automatically if only one result is found
|
||||
// TODO: Add option to disable this
|
||||
if (appsListDisplayed.size == 1 && intention == "view") {
|
||||
// Launch apps automatically if only one result is found and the user wants it
|
||||
// Disabled at the moment. The Setting 'PREF_SEARCH_AUTO_LAUNCH' may be
|
||||
// modifyable at some later point.
|
||||
if (appsListDisplayed.size == 1 && intention == "view"
|
||||
&& launcherPreferences.getBoolean(PREF_SEARCH_AUTO_LAUNCH, false)) {
|
||||
launch(appsListDisplayed[0].packageName.toString(), activity)
|
||||
|
||||
val inputMethodManager = activity.getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
|
|
Loading…
Add table
Reference in a new issue