Do not collapse player when pressing more in bottom nav (#7600)

This commit is contained in:
ByteHamster 2025-01-05 17:56:10 +01:00 committed by GitHub
parent 93993c94ba
commit 0f68022e5e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -562,11 +562,11 @@ public class MainActivity extends CastEnabledActivity {
}
private final NavigationBarView.OnItemSelectedListener bottomItemSelectedListener = item -> {
sheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
if (item.getItemId() == R.id.bottom_navigation_more) {
showBottomNavigationMorePopup();
return false;
} else {
sheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
loadFragment(NavigationNames.getBottomNavigationFragmentTag(item.getItemId()), null);
return true;
}
@ -599,6 +599,7 @@ public class MainActivity extends CastEnabledActivity {
listPopupWindow.setAnchorView(bottomNavigationView);
listPopupWindow.setAdapter(new BottomNavigationMoreAdapter(this, popupMenuItems));
listPopupWindow.setOnItemClickListener((parent, view, position, id) -> {
sheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
if (position == popupMenuItems.size() - 1) {
startActivity(new Intent(this, PreferenceActivity.class));
} else if (position == popupMenuItems.size() - 2) {