Skip to content

Commit

Permalink
fix(Reddit - Hide ads): Constrain to last working version 2024.17.0 (#…
Browse files Browse the repository at this point in the history
…3192)

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
  • Loading branch information
ascopes and oSumAtrIX committed May 30, 2024
1 parent f7cf983 commit 4fb3456
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 4fb3456

Please sign in to comment.