mirror of
https://github.com/He4eT/yamf_launcher.git
synced 2026-05-05 01:47:24 +00:00
Made the app menu refresh each time that the user goes back to home automatically
This commit is contained in:
parent
17cf58846d
commit
cb78628941
1 changed files with 4 additions and 1 deletions
|
|
@ -373,15 +373,18 @@ class MainActivity : AppCompatActivity(), AppMenuAdapter.OnItemClickListener, Ap
|
||||||
|
|
||||||
fun backToHome() {
|
fun backToHome() {
|
||||||
closeKeyboard()
|
closeKeyboard()
|
||||||
searchView.setText("")
|
|
||||||
animations.showHome(binding)
|
animations.showHome(binding)
|
||||||
animations.backgroundOut(this@MainActivity)
|
animations.backgroundOut(this@MainActivity)
|
||||||
val handler = Handler(Looper.getMainLooper())
|
val handler = Handler(Looper.getMainLooper())
|
||||||
handler.postDelayed({
|
handler.postDelayed({
|
||||||
binding.menutitle.visibility = View.VISIBLE
|
binding.menutitle.visibility = View.VISIBLE
|
||||||
|
searchView.setText("")
|
||||||
}, 100)
|
}, 100)
|
||||||
handler.postDelayed({
|
handler.postDelayed({
|
||||||
recyclerView.scrollToPosition(0)
|
recyclerView.scrollToPosition(0)
|
||||||
|
CoroutineScope(Dispatchers.Default).launch {
|
||||||
|
refreshAppMenu()
|
||||||
|
}
|
||||||
}, 150)
|
}, 150)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue