mirror of
https://github.com/He4eT/yamf_launcher.git
synced 2026-05-04 17:37:25 +00:00
Fixed uninstall popup causing a return to home
This commit is contained in:
parent
2b9db81936
commit
478524c49d
2 changed files with 7 additions and 2 deletions
|
|
@ -105,6 +105,7 @@ class AppActionMenu(private val activity: MainActivity, private val binding: Act
|
||||||
intent.data = Uri.parse("package:${appInfo.packageName}")
|
intent.data = Uri.parse("package:${appInfo.packageName}")
|
||||||
intent.putExtra(Intent.EXTRA_USER, userHandle)
|
intent.putExtra(Intent.EXTRA_USER, userHandle)
|
||||||
activity.startActivity(intent)
|
activity.startActivity(intent)
|
||||||
|
activity.returnAllowed = false
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun renameApp(textView: TextView, editLayout: LinearLayout, actionMenu: View, appActivity: LauncherActivityInfo?, appInfo: ApplicationInfo, userHandle: UserHandle, workProfile: Int) {
|
private fun renameApp(textView: TextView, editLayout: LinearLayout, actionMenu: View, appActivity: LauncherActivityInfo?, appInfo: ApplicationInfo, userHandle: UserHandle, workProfile: Int) {
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,8 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
|
||||||
private lateinit var gestureDetector: GestureDetector
|
private lateinit var gestureDetector: GestureDetector
|
||||||
private lateinit var shortcutGestureDetector: GestureDetector
|
private lateinit var shortcutGestureDetector: GestureDetector
|
||||||
|
|
||||||
|
var returnAllowed = true
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
binding = ActivityMainBinding.inflate(layoutInflater)
|
binding = ActivityMainBinding.inflate(layoutInflater)
|
||||||
|
|
@ -721,13 +723,15 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
|
||||||
super.onStart()
|
super.onStart()
|
||||||
// Keyboard is sometimes open when going back to the app, so close it.
|
// Keyboard is sometimes open when going back to the app, so close it.
|
||||||
closeKeyboard()
|
closeKeyboard()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("NotifyDataSetChanged")
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
|
if (returnAllowed) {
|
||||||
backToHome(0)
|
backToHome(0)
|
||||||
|
}
|
||||||
|
returnAllowed = true
|
||||||
adapter?.notifyDataSetChanged()
|
adapter?.notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue