Skip to content

Commit

Permalink
fix(YouTube - Enable gradient loading screen): `Enable gradient loadi…
Browse files Browse the repository at this point in the history
…ng screen` not working on YouTube 19.34.42+
  • Loading branch information
inotia00 authored and anddea committed Dec 17, 2024
1 parent ef14e5a commit d6b6a42
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ package app.revanced.patches.youtube.general.loadingscreen

import app.revanced.util.fingerprint.legacyFingerprint

internal val gradientLoadingScreenPrimaryFingerprint = legacyFingerprint(
internal const val GRADIENT_LOADING_SCREEN_AB_CONSTANT = 45412406L

internal val useGradientLoadingScreenFingerprint = legacyFingerprint(
name = "gradientLoadingScreenPrimaryFingerprint",
literals = listOf(45412406L),
literals = listOf(GRADIENT_LOADING_SCREEN_AB_CONSTANT),
)

internal val gradientLoadingScreenSecondaryFingerprint = legacyFingerprint(
name = "gradientLoadingScreenSecondaryFingerprint",
literals = listOf(45418917L),
)
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,10 @@ val gradientLoadingScreenPatch = bytecodePatch(

execute {

mapOf(
gradientLoadingScreenPrimaryFingerprint to 45412406L,
gradientLoadingScreenSecondaryFingerprint to 45418917L
).forEach { (fingerprint, literal) ->
fingerprint.injectLiteralInstructionBooleanCall(
literal,
"$GENERAL_CLASS_DESCRIPTOR->enableGradientLoadingScreen()Z"
)
}
useGradientLoadingScreenFingerprint.injectLiteralInstructionBooleanCall(
GRADIENT_LOADING_SCREEN_AB_CONSTANT,
"$GENERAL_CLASS_DESCRIPTOR->enableGradientLoadingScreen()Z"
)

// region add settings

Expand Down

0 comments on commit d6b6a42

Please sign in to comment.