Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
LisoUseInAIKyrios committed Dec 26, 2024
1 parent fa8f514 commit 1ecfdcc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ public static void setVideoTime(long millis) {
return;
}

if (Utils.isLandscapeOrientation()) {
if (mode == FullscreenMode.PORTRAIT) {
if (VideoInformation.isAtEndOfVideo()
&& VideoState.getCurrent() == VideoState.PLAYING
&& PlayerType.getCurrent() == PlayerType.WATCH_WHILE_FULLSCREEN) {

if (Utils.isLandscapeOrientation()) {
if (mode == FullscreenMode.PORTRAIT) {
return;
}
} else if (mode == FullscreenMode.LANDSCAPE) {
return;
}
} else if (mode == FullscreenMode.LANDSCAPE) {
return;
}

if (PlayerType.getCurrent() == PlayerType.WATCH_WHILE_FULLSCREEN
&& VideoState.getCurrent() == VideoState.PLAYING
&& VideoInformation.isAtEndOfVideo()) {
ImageView fullscreenButton = PlayerControlsPatch.fullscreenButtonRef.get();

if (fullscreenButton != null) {
Logger.printDebug(() -> "Clicking fullscreen button");
fullscreenButton.performClick();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ enum class PlayerType {
onChange(currentPlayerType)
}

@Volatile // Rread/write from different threads.
@Volatile // Read/write from different threads.
private var currentPlayerType = NONE

/**
Expand Down

0 comments on commit 1ecfdcc

Please sign in to comment.