mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-01 23:24:28 +02:00
fix(YouTube - Overlay buttons): Overlay buttons do not disappear immediately when fullscreen button is clicked
This commit is contained in:
parent
2760fce646
commit
f5834ab742
@ -106,7 +106,7 @@ public class PlayerControlsPatch {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void changeVisibilityNegatedImmediately() {
|
public static void changeVisibilityNegatedImmediately() {
|
||||||
// AlwaysRepeat.changeVisibilityNegatedImmediate();
|
// AlwaysRepeat.changeVisibilityNegatedImmediate();
|
||||||
// CopyVideoUrl.changeVisibilityNegatedImmediate();
|
// CopyVideoUrl.changeVisibilityNegatedImmediate();
|
||||||
// CopyVideoUrlTimestamp.changeVisibilityNegatedImmediate();
|
// CopyVideoUrlTimestamp.changeVisibilityNegatedImmediate();
|
||||||
|
@ -31,7 +31,7 @@ enum class BottomSheetState {
|
|||||||
onChange(currentBottomSheetState)
|
onChange(currentBottomSheetState)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Volatile // value is read/write from different threads
|
@Volatile // Read/write from different threads.
|
||||||
private var currentBottomSheetState = CLOSED
|
private var currentBottomSheetState = CLOSED
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -40,7 +40,7 @@ enum class LockModeState {
|
|||||||
onChange(value)
|
onChange(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Volatile // value is read/write from different threads
|
@Volatile // Read/write from different threads.
|
||||||
private var currentLockModeState = LOCK_MODE_STATE_ENUM_UNKNOWN
|
private var currentLockModeState = LOCK_MODE_STATE_ENUM_UNKNOWN
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -38,6 +38,7 @@ enum class PlayerControlsVisibility {
|
|||||||
currentPlayerControlsVisibility = value
|
currentPlayerControlsVisibility = value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Volatile // Read/write from different threads.
|
||||||
private var currentPlayerControlsVisibility: PlayerControlsVisibility? = null
|
private var currentPlayerControlsVisibility: PlayerControlsVisibility? = null
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -71,7 +71,7 @@ enum class PlayerType {
|
|||||||
onChange(value)
|
onChange(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Volatile // value is read/write from different threads
|
@Volatile // Read/write from different threads.
|
||||||
private var currentPlayerType = NONE
|
private var currentPlayerType = NONE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,7 +31,7 @@ enum class ShortsPlayerState {
|
|||||||
onChange(value)
|
onChange(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Volatile // value is read/write from different threads
|
@Volatile // Read/write from different threads.
|
||||||
private var currentShortsPlayerState = CLOSED
|
private var currentShortsPlayerState = CLOSED
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -39,6 +39,7 @@ enum class VideoState {
|
|||||||
currentVideoState = value
|
currentVideoState = value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Volatile // Read/write from different threads.
|
||||||
private var currentVideoState: VideoState? = null
|
private var currentVideoState: VideoState? = null
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -9,8 +9,11 @@ import app.revanced.patcher.patch.resourcePatch
|
|||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.patches.youtube.utils.extension.Constants.UTILS_PATH
|
import app.revanced.patches.youtube.utils.extension.Constants.UTILS_PATH
|
||||||
import app.revanced.patches.youtube.utils.extension.sharedExtensionPatch
|
import app.revanced.patches.youtube.utils.extension.sharedExtensionPatch
|
||||||
|
import app.revanced.patches.youtube.utils.fullscreen.enterFullscreenMethod
|
||||||
|
import app.revanced.patches.youtube.utils.fullscreen.fullscreenButtonHookPatch
|
||||||
import app.revanced.patches.youtube.utils.playerButtonsResourcesFingerprint
|
import app.revanced.patches.youtube.utils.playerButtonsResourcesFingerprint
|
||||||
import app.revanced.patches.youtube.utils.playerButtonsVisibilityFingerprint
|
import app.revanced.patches.youtube.utils.playerButtonsVisibilityFingerprint
|
||||||
|
import app.revanced.patches.youtube.utils.playservice.is_19_23_or_greater
|
||||||
import app.revanced.patches.youtube.utils.playservice.is_19_25_or_greater
|
import app.revanced.patches.youtube.utils.playservice.is_19_25_or_greater
|
||||||
import app.revanced.patches.youtube.utils.playservice.versionCheckPatch
|
import app.revanced.patches.youtube.utils.playservice.versionCheckPatch
|
||||||
import app.revanced.patches.youtube.utils.resourceid.sharedResourceIdPatch
|
import app.revanced.patches.youtube.utils.resourceid.sharedResourceIdPatch
|
||||||
@ -46,6 +49,7 @@ private val playerControlsBytecodePatch = bytecodePatch(
|
|||||||
sharedExtensionPatch,
|
sharedExtensionPatch,
|
||||||
sharedResourceIdPatch,
|
sharedResourceIdPatch,
|
||||||
versionCheckPatch,
|
versionCheckPatch,
|
||||||
|
fullscreenButtonHookPatch,
|
||||||
)
|
)
|
||||||
|
|
||||||
execute {
|
execute {
|
||||||
@ -114,6 +118,18 @@ private val playerControlsBytecodePatch = bytecodePatch(
|
|||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
|
// region patch for fix buttons do not hide immediately when fullscreen button is clicked
|
||||||
|
|
||||||
|
// Reproduced only in RVX
|
||||||
|
if (is_19_23_or_greater) {
|
||||||
|
enterFullscreenMethod.addInstruction(
|
||||||
|
0,
|
||||||
|
"invoke-static {}, $EXTENSION_PLAYER_CONTROLS_CLASS_DESCRIPTOR->changeVisibilityNegatedImmediately()V"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// endregion
|
||||||
|
|
||||||
// region patch initialize of overlay button or SponsorBlock button
|
// region patch initialize of overlay button or SponsorBlock button
|
||||||
|
|
||||||
mapOf(
|
mapOf(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user