Skip to content

Commit

Permalink
feat(YouTube Music): rename Enable Cairo splash animation to `Disab…
Browse files Browse the repository at this point in the history
…le Cairo splash animation` inotia00/ReVanced_Extended#2366
  • Loading branch information
inotia00 committed Sep 6, 2024
1 parent fd021fd commit 3d331a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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",
]
)
Expand All @@ -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.")

}
}
4 changes: 2 additions & 2 deletions src/main/resources/music/settings/host/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,8 @@ Some features may not work properly in the old player layout."</string>
<string name="revanced_bypass_image_region_restrictions_summary">Replaces the domain that is blocked in some regions so that playlist thumbnails, channel avatars, etc. can be received.</string>
<string name="revanced_change_share_sheet_title">Change share sheet</string>
<string name="revanced_change_share_sheet_summary">Change from in-app share sheet to system share sheet.</string>
<string name="revanced_enable_cairo_splash_animation_title">Enable Cairo splash animation</string>
<string name="revanced_enable_cairo_splash_animation_summary">Enables Cairo splash animation when the app starts up.</string>
<string name="revanced_disable_cairo_splash_animation_title">Disable Cairo splash animation</string>
<string name="revanced_disable_cairo_splash_animation_summary">Disables Cairo splash animation when the app starts up.</string>
<string name="revanced_enable_debug_logging_title">Enable debug logging</string>
<string name="revanced_enable_debug_logging_summary">Prints the debug log.</string>
<string name="revanced_enable_debug_buffer_logging_title">Enable debug buffer logging</string>
Expand Down

0 comments on commit 3d331a7

Please sign in to comment.