mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 13:17:46 +02:00
feat(YouTube/Miniplayer): add Enable double-tap action
setting
This commit is contained in:
@ -178,6 +178,22 @@ object MiniplayerPatch : BaseBytecodePatch(
|
||||
|
||||
// endregion
|
||||
|
||||
// region Enable double tap action.
|
||||
|
||||
if (SettingsPatch.upward1925) {
|
||||
MiniplayerModernConstructorFingerprint.literalInstructionBooleanHook(
|
||||
45628823,
|
||||
"$INTEGRATIONS_CLASS_DESCRIPTOR->enableMiniplayerDoubleTapAction()Z"
|
||||
)
|
||||
MiniplayerModernConstructorFingerprint.literalInstructionBooleanHook(
|
||||
45630429,
|
||||
"$INTEGRATIONS_CLASS_DESCRIPTOR->getModernMiniplayerOverride(Z)Z"
|
||||
)
|
||||
settingArray += "SETTINGS: MINIPLAYER_DOUBLE_TAP_ACTION"
|
||||
}
|
||||
|
||||
// endregion
|
||||
|
||||
val miniplayerModernViewParentClassDef = MiniplayerModernViewParentFingerprint.resultOrThrow().classDef
|
||||
|
||||
// region Fix 19.16 using mixed up drawables for tablet modern.
|
||||
|
@ -20,7 +20,12 @@ internal object MiniplayerModernConstructorFingerprint : MethodFingerprint(
|
||||
if (MethodUtil.isConstructor(it)) constructorMethodCount += 1
|
||||
}
|
||||
|
||||
constructorMethodCount > 0
|
||||
if (!SettingsPatch.upward1925)
|
||||
return@custom true
|
||||
|
||||
// Double tap action (Used in YouTube 19.25.39+).
|
||||
methodDef.containsWideLiteralInstructionIndex(45628823)
|
||||
&& methodDef.containsWideLiteralInstructionIndex(45630429)
|
||||
}
|
||||
) {
|
||||
private var constructorMethodCount = 0
|
||||
|
Reference in New Issue
Block a user