mirror of
https://github.com/revanced/revanced-patches
synced 2024-12-30 21:25:49 +01:00
refactor(YouTube - Exit fullscreen mode): Improve logging
This commit is contained in:
parent
b61c8ec8da
commit
6531273ac0
@ -28,16 +28,20 @@ public class ExitFullscreenPatch {
|
||||
}
|
||||
|
||||
if (PlayerType.getCurrent() == PlayerType.WATCH_WHILE_FULLSCREEN) {
|
||||
if (Utils.isLandscapeOrientation()) {
|
||||
if (mode == FullscreenMode.PORTRAIT) {
|
||||
if (mode != FullscreenMode.PORTRAIT_LANDSCAPE) {
|
||||
if (Utils.isLandscapeOrientation()) {
|
||||
if (mode == FullscreenMode.PORTRAIT) {
|
||||
return;
|
||||
}
|
||||
} else if (mode == FullscreenMode.LANDSCAPE) {
|
||||
return;
|
||||
}
|
||||
} else if (mode == FullscreenMode.LANDSCAPE) {
|
||||
return;
|
||||
}
|
||||
|
||||
ImageView fullscreenButton = PlayerControlsPatch.fullscreenButtonRef.get();
|
||||
if (fullscreenButton != null) {
|
||||
if (fullscreenButton == null) {
|
||||
Logger.printDebug(() -> "Fullscreen button is null, cannot click");
|
||||
} else {
|
||||
Logger.printDebug(() -> "Clicking fullscreen button");
|
||||
fullscreenButton.performClick();
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ public class PlayerControlsPatch {
|
||||
*/
|
||||
public static void setFullscreenCloseButton(ImageView imageButton) {
|
||||
fullscreenButtonRef = new WeakReference<>(imageButton);
|
||||
Logger.printDebug(() -> "Fullscreen button set");
|
||||
|
||||
if (!fullscreenButtonVisibilityCallbacksExist()) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user