fix: music player now stays closed on startup if there are no songs in the queue

This commit is contained in:
antonio 2023-10-12 21:31:46 +02:00
parent bae43cbfe9
commit e88d6d7844

View file

@ -119,8 +119,6 @@ public class MainActivity extends BaseActivity {
fragmentManager.beginTransaction().replace(R.id.player_bottom_sheet, new PlayerBottomSheetFragment(), "PlayerBottomSheet").commit(); fragmentManager.beginTransaction().replace(R.id.player_bottom_sheet, new PlayerBottomSheetFragment(), "PlayerBottomSheet").commit();
setBottomSheetInPeek(mainViewModel.isQueueLoaded()); setBottomSheetInPeek(mainViewModel.isQueueLoaded());
collapseBottomSheet();
} }
public void setBottomSheetInPeek(Boolean isVisible) { public void setBottomSheetInPeek(Boolean isVisible) {
@ -163,7 +161,7 @@ public class MainActivity extends BaseActivity {
switch (state) { switch (state) {
case BottomSheetBehavior.STATE_HIDDEN: case BottomSheetBehavior.STATE_HIDDEN:
hideMusicSession(); resetMusicSession();
break; break;
case BottomSheetBehavior.STATE_COLLAPSED: case BottomSheetBehavior.STATE_COLLAPSED:
if (playerBottomSheetFragment != null) if (playerBottomSheetFragment != null)