feat(YouTube Music): rename Enable Cairo splash animation to Disable Cairo splash animation https://github.com/inotia00/ReVanced_Extended/issues/2366

This commit is contained in:
inotia00
2024-09-07 03:36:21 +09:00
parent fd021fdf15
commit 3d331a70fb
2 changed files with 8 additions and 9 deletions

View File

@ -2,7 +2,6 @@ package app.revanced.patches.music.misc.splash
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchException
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.music.misc.splash.fingerprints.CairoSplashAnimationConfigFingerprint
@ -12,14 +11,14 @@ import app.revanced.patches.music.utils.settings.SettingsPatch
import app.revanced.util.literalInstructionBooleanHook
@Patch(
name = "Enable Cairo splash animation",
description = "Adds an option to enable Cairo splash animation.",
name = "Disable Cairo splash animation",
description = "Adds an option to disable Cairo splash animation.",
dependencies = [SettingsPatch::class],
compatiblePackages = [
CompatiblePackage(
"com.google.android.apps.youtube.music",
[
"7.08.54",
"7.06.54",
"7.17.51",
]
)
@ -34,17 +33,17 @@ object CairoSplashAnimationPatch : BytecodePatch(
CairoSplashAnimationConfigFingerprint.result?.let {
CairoSplashAnimationConfigFingerprint.literalInstructionBooleanHook(
45635386,
"$MISC_PATH/CairoSplashAnimationPatch;->enableCairoSplashAnimation()Z"
"$MISC_PATH/CairoSplashAnimationPatch;->disableCairoSplashAnimation(Z)Z"
)
SettingsPatch.addSwitchPreference(
CategoryType.MISC,
"revanced_enable_cairo_splash_animation",
"revanced_disable_cairo_splash_animation",
"false"
)
}
?: throw PatchException("WARNING: This patch is not supported in this version. Use YouTube Music 7.08.54 or later.")
?: println("WARNING: This patch is not supported in this version. Use YouTube Music 7.06.54 or later.")
}
}