From d25dcfe49ac331c9b3dca739ba0be95dbab669cc Mon Sep 17 00:00:00 2001 From: Swakshan <56347042+Swakshan@users.noreply.github.com> Date: Sun, 4 Jan 2026 18:44:29 +0530 Subject: [PATCH] feat(Letterboxd): Add `Unlock app icons` patch (#6415) --- patches/api/patches.api | 4 ++++ .../unlock/unlockAppIcons/Fingerprints.kt | 9 +++++++++ .../unlock/unlockAppIcons/UnlockAppIconsPatch.kt | 16 ++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 patches/src/main/kotlin/app/revanced/patches/letterboxd/unlock/unlockAppIcons/Fingerprints.kt create mode 100644 patches/src/main/kotlin/app/revanced/patches/letterboxd/unlock/unlockAppIcons/UnlockAppIconsPatch.kt diff --git a/patches/api/patches.api b/patches/api/patches.api index 439040929..9b5ac4d0c 100644 --- a/patches/api/patches.api +++ b/patches/api/patches.api @@ -352,6 +352,10 @@ public final class app/revanced/patches/letterboxd/ads/HideAdsPatchKt { public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch; } +public final class app/revanced/patches/letterboxd/unlock/unlockAppIcons/UnlockAppIconsPatchKt { + public static final fun getUnlockAppIconsPatch ()Lapp/revanced/patcher/patch/BytecodePatch; +} + public final class app/revanced/patches/lightroom/misc/login/DisableMandatoryLoginPatchKt { public static final fun getDisableMandatoryLoginPatch ()Lapp/revanced/patcher/patch/BytecodePatch; } diff --git a/patches/src/main/kotlin/app/revanced/patches/letterboxd/unlock/unlockAppIcons/Fingerprints.kt b/patches/src/main/kotlin/app/revanced/patches/letterboxd/unlock/unlockAppIcons/Fingerprints.kt new file mode 100644 index 000000000..1b549cd57 --- /dev/null +++ b/patches/src/main/kotlin/app/revanced/patches/letterboxd/unlock/unlockAppIcons/Fingerprints.kt @@ -0,0 +1,9 @@ +package app.revanced.patches.letterboxd.unlock.unlockAppIcons + +import app.revanced.patcher.fingerprint + +internal val getCanChangeAppIconFingerprint = fingerprint { + custom { method, classDef -> + method.name == "getCanChangeAppIcon" && classDef.type.endsWith("SettingsAppIconFragment;") + } +} diff --git a/patches/src/main/kotlin/app/revanced/patches/letterboxd/unlock/unlockAppIcons/UnlockAppIconsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/letterboxd/unlock/unlockAppIcons/UnlockAppIconsPatch.kt new file mode 100644 index 000000000..54d6f3df9 --- /dev/null +++ b/patches/src/main/kotlin/app/revanced/patches/letterboxd/unlock/unlockAppIcons/UnlockAppIconsPatch.kt @@ -0,0 +1,16 @@ + +package app.revanced.patches.letterboxd.unlock.unlockAppIcons + +import app.revanced.patcher.patch.bytecodePatch +import app.revanced.util.returnEarly + +@Suppress("unused") +val unlockAppIconsPatch = bytecodePatch( + name = "Unlock app icons", +) { + compatibleWith("com.letterboxd.letterboxd") + + execute { + getCanChangeAppIconFingerprint.method.returnEarly(true) + } +}