From 4736271c81b3d56a51d5d9ea562635af33a8154f Mon Sep 17 00:00:00 2001 From: Bnyro Date: Mon, 11 Mar 2024 18:41:22 +0100 Subject: [PATCH] fix: going back from a video shows search history instead of playlist --- .../java/com/github/libretube/ui/activities/MainActivity.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/github/libretube/ui/activities/MainActivity.kt b/app/src/main/java/com/github/libretube/ui/activities/MainActivity.kt index afbbf28ae..ce6f8a226 100644 --- a/app/src/main/java/com/github/libretube/ui/activities/MainActivity.kt +++ b/app/src/main/java/com/github/libretube/ui/activities/MainActivity.kt @@ -249,9 +249,10 @@ class MainActivity : BaseActivity() { } private fun isSearchInProgress(): Boolean { - if (!::navController.isInitialized) return false + if (!this::navController.isInitialized) return false val id = navController.currentDestination?.id ?: return false - return id in listOf(R.id.searchFragment, R.id.searchResultFragment, R.id.channelFragment) + + return id in listOf(R.id.searchFragment, R.id.searchResultFragment, R.id.channelFragment, R.id.playlistFragment) } override fun invalidateMenu() {