mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-23 08:30:44 +00:00
Remove uses of setBottomSheetCallback().
This commit is contained in:
parent
dcb332e08d
commit
81fb44c45c
@ -208,6 +208,8 @@ public final class VideoDetailFragment
|
|||||||
private Player player;
|
private Player player;
|
||||||
private final PlayerHolder playerHolder = PlayerHolder.getInstance();
|
private final PlayerHolder playerHolder = PlayerHolder.getInstance();
|
||||||
|
|
||||||
|
private BottomSheetBehavior.BottomSheetCallback bottomSheetCallback;
|
||||||
|
|
||||||
/*//////////////////////////////////////////////////////////////////////////
|
/*//////////////////////////////////////////////////////////////////////////
|
||||||
// Service management
|
// Service management
|
||||||
//////////////////////////////////////////////////////////////////////////*/
|
//////////////////////////////////////////////////////////////////////////*/
|
||||||
@ -386,7 +388,7 @@ public final class VideoDetailFragment
|
|||||||
disposables.clear();
|
disposables.clear();
|
||||||
positionSubscriber = null;
|
positionSubscriber = null;
|
||||||
currentWorker = null;
|
currentWorker = null;
|
||||||
bottomSheetBehavior.setBottomSheetCallback(null);
|
bottomSheetBehavior.removeBottomSheetCallback(bottomSheetCallback);
|
||||||
|
|
||||||
if (activity.isFinishing()) {
|
if (activity.isFinishing()) {
|
||||||
playQueue = null;
|
playQueue = null;
|
||||||
@ -2289,7 +2291,7 @@ public final class VideoDetailFragment
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bottomSheetBehavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() {
|
bottomSheetCallback = new BottomSheetBehavior.BottomSheetCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onStateChanged(@NonNull final View bottomSheet, final int newState) {
|
public void onStateChanged(@NonNull final View bottomSheet, final int newState) {
|
||||||
bottomSheetState = newState;
|
bottomSheetState = newState;
|
||||||
@ -2349,6 +2351,8 @@ public final class VideoDetailFragment
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case BottomSheetBehavior.STATE_HALF_EXPANDED:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2356,7 +2360,9 @@ public final class VideoDetailFragment
|
|||||||
public void onSlide(@NonNull final View bottomSheet, final float slideOffset) {
|
public void onSlide(@NonNull final View bottomSheet, final float slideOffset) {
|
||||||
setOverlayLook(binding.appBarLayout, behavior, slideOffset);
|
setOverlayLook(binding.appBarLayout, behavior, slideOffset);
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
|
||||||
|
bottomSheetBehavior.addBottomSheetCallback(bottomSheetCallback);
|
||||||
|
|
||||||
// User opened a new page and the player will hide itself
|
// User opened a new page and the player will hide itself
|
||||||
activity.getSupportFragmentManager().addOnBackStackChangedListener(() -> {
|
activity.getSupportFragmentManager().addOnBackStackChangedListener(() -> {
|
||||||
|
Loading…
Reference in New Issue
Block a user