Made the app menu refresh each time that the user goes back to home automatically

This commit is contained in:
ottoptj 2024-06-10 19:38:20 +03:00
commit cb78628941

View file

@ -373,15 +373,18 @@ class MainActivity : AppCompatActivity(), AppMenuAdapter.OnItemClickListener, Ap
fun backToHome() {
closeKeyboard()
searchView.setText("")
animations.showHome(binding)
animations.backgroundOut(this@MainActivity)
val handler = Handler(Looper.getMainLooper())
handler.postDelayed({
binding.menutitle.visibility = View.VISIBLE
searchView.setText("")
}, 100)
handler.postDelayed({
recyclerView.scrollToPosition(0)
CoroutineScope(Dispatchers.Default).launch {
refreshAppMenu()
}
}, 150)
}