mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 23:40:33 +05:30
fix: backstack when opening search fragment (#7010)
This commit is contained in:
parent
7c7e69d369
commit
e42866de7c
@ -356,7 +356,7 @@ class MainActivity : BaseActivity() {
|
||||
override fun onMenuItemActionExpand(item: MenuItem): Boolean {
|
||||
if (navController.currentDestination?.id != R.id.searchResultFragment) {
|
||||
searchViewModel.setQuery(null)
|
||||
navController.navigate(R.id.searchFragment)
|
||||
navController.navigate(R.id.openSearch)
|
||||
}
|
||||
item.setShowAsAction(
|
||||
MenuItem.SHOW_AS_ACTION_ALWAYS or MenuItem.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW
|
||||
|
@ -119,4 +119,10 @@
|
||||
<action
|
||||
android:id="@+id/showSearchResults"
|
||||
app:destination="@id/searchResultFragment" />
|
||||
<action
|
||||
android:id="@+id/openSearch"
|
||||
app:destination="@id/searchFragment"
|
||||
app:popUpTo="@id/homeFragment"
|
||||
app:popUpToSaveState="true"
|
||||
app:restoreState="false" />
|
||||
</navigation>
|
Loading…
x
Reference in New Issue
Block a user