close search at pressing Back

This commit is contained in:
tibbi 2022-07-31 18:42:12 +02:00
parent decb60de84
commit 56e2d4f67b
1 changed files with 3 additions and 1 deletions

View File

@ -642,7 +642,9 @@ class MainActivity : SimpleActivity() {
return
}
if (getCurrentFragment()!!.breadcrumbs.getItemCount() <= 1) {
if (isSearchOpen && mSearchMenuItem != null) {
mSearchMenuItem!!.collapseActionView()
} else if (getCurrentFragment()!!.breadcrumbs.getItemCount() <= 1) {
if (!wasBackJustPressed && config.pressBackTwice) {
wasBackJustPressed = true
toast(R.string.press_back_again)