Skip to content

Commit 7bd9cab

Browse files
ascopesoSumAtrIX
andauthored
fix(Reddit - Hide ads): Constrain to last working version 2024.17.0 (#3192)
Co-authored-by: oSumAtrIX <[email protected]>
1 parent 7946d50 commit 7bd9cab

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/main/kotlin/app/revanced/patches/reddit/ad/banner/HideBannerPatch.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import app.revanced.patcher.data.ResourceContext
44
import app.revanced.patcher.patch.ResourcePatch
55
import app.revanced.patcher.patch.annotation.Patch
66

7+
// Note that for now, this patch and anything using it will only work on
8+
// Reddit 2024.17.0 or older. Newer versions will crash during patching.
9+
// See https://github.com/ReVanced/revanced-patches/issues/3099
710
@Patch(description = "Hides banner ads from comments on subreddits.")
811
object HideBannerPatch : ResourcePatch() {
912
private const val RESOURCE_FILE_PATH = "res/layout/merge_listheader_link_detail.xml"

src/main/kotlin/app/revanced/patches/reddit/ad/general/HideAdsPatch.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
2020
@Patch(
2121
name = "Hide ads",
2222
dependencies = [HideBannerPatch::class, HideCommentAdsPatch::class],
23-
compatiblePackages = [CompatiblePackage("com.reddit.frontpage")],
23+
// Note that for now, this patch and anything using it will only work on
24+
// Reddit 2024.17.0 or older. Newer versions will crash during patching.
25+
// See https://github.com/ReVanced/revanced-patches/issues/3099
26+
// and https://github.com/iBotPeaches/Apktool/issues/3534.
27+
// This constraint is necessary due to dependency on HideBannerPatch.
28+
compatiblePackages = [CompatiblePackage("com.reddit.frontpage", ["2024.17.0"])],
2429
requiresIntegrations = true,
2530
)
2631
@Suppress("unused")

0 commit comments

Comments
 (0)