From 4eb3ccc2a40320b1cf0ff80ee523ad037da1218a Mon Sep 17 00:00:00 2001 From: ottoptj Date: Mon, 9 Sep 2024 11:03:37 +0300 Subject: [PATCH] Fixed autolaunching --- app/src/main/java/eu/ottop/yamlauncher/MainActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/ottop/yamlauncher/MainActivity.kt b/app/src/main/java/eu/ottop/yamlauncher/MainActivity.kt index e7cafc8..07006fa 100644 --- a/app/src/main/java/eu/ottop/yamlauncher/MainActivity.kt +++ b/app/src/main/java/eu/ottop/yamlauncher/MainActivity.kt @@ -884,7 +884,7 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh } private suspend fun applySearchFilter(newFilteredApps: MutableList>) { - if (menuView.displayedChild == 0 && appAdapter?.shortcutTextView == null && newFilteredApps.size == 1) { + if (sharedPreferenceManager.isAutoLaunchEnabled() && menuView.displayedChild == 0 && appAdapter?.shortcutTextView == null && newFilteredApps.size == 1) { appUtils.launchApp(newFilteredApps[0].first.applicationInfo.packageName, newFilteredApps[0].second) } else if (!listsEqual(installedApps, newFilteredApps)) { updateMenu(newFilteredApps)