diff --git a/src/main/kotlin/app/revanced/patches/reddit/ad/banner/HideBannerPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/ad/banner/HideBannerPatch.kt index c51216961..311803195 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/ad/banner/HideBannerPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/ad/banner/HideBannerPatch.kt @@ -4,6 +4,9 @@ import app.revanced.patcher.data.ResourceContext import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotation.Patch +// Note that for now, this patch and anything using it will only work on +// Reddit 2024.17.0 or older. Newer versions will crash during patching. +// See https://github.com/ReVanced/revanced-patches/issues/3099 @Patch(description = "Hides banner ads from comments on subreddits.") object HideBannerPatch : ResourcePatch() { private const val RESOURCE_FILE_PATH = "res/layout/merge_listheader_link_detail.xml" diff --git a/src/main/kotlin/app/revanced/patches/reddit/ad/general/HideAdsPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/ad/general/HideAdsPatch.kt index 02465c905..8aa188e9f 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/ad/general/HideAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/ad/general/HideAdsPatch.kt @@ -20,7 +20,12 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference @Patch( name = "Hide ads", dependencies = [HideBannerPatch::class, HideCommentAdsPatch::class], - compatiblePackages = [CompatiblePackage("com.reddit.frontpage")], + // Note that for now, this patch and anything using it will only work on + // Reddit 2024.17.0 or older. Newer versions will crash during patching. + // See https://github.com/ReVanced/revanced-patches/issues/3099 + // and https://github.com/iBotPeaches/Apktool/issues/3534. + // This constraint is necessary due to dependency on HideBannerPatch. + compatiblePackages = [CompatiblePackage("com.reddit.frontpage", ["2024.17.0"])], requiresIntegrations = true, ) @Suppress("unused")