diff --git a/app/src/main/java/com/github/libretube/activities/MainActivity.kt b/app/src/main/java/com/github/libretube/activities/MainActivity.kt index aac8d554a..363944b56 100644 --- a/app/src/main/java/com/github/libretube/activities/MainActivity.kt +++ b/app/src/main/java/com/github/libretube/activities/MainActivity.kt @@ -193,8 +193,10 @@ class MainActivity : AppCompatActivity() { }) searchView.setOnCloseListener { - onBackPressed() - true + if (navController.currentDestination?.id == R.id.searchFragment) { + onBackPressed() + } + false } return super.onCreateOptionsMenu(menu) }