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 1699efec8..9d5def8a8 100644 --- a/app/src/main/java/com/github/libretube/activities/MainActivity.kt +++ b/app/src/main/java/com/github/libretube/activities/MainActivity.kt @@ -186,8 +186,10 @@ class MainActivity : AppCompatActivity() { }) searchView.setOnCloseListener { - onBackPressed() - true + if (navController.currentDestination?.id == R.id.searchFragment) { + onBackPressed() + } + false } return super.onCreateOptionsMenu(menu) }