fix(Reddit - Hide ads): Constrain to last working version 2024.17.0 (#3192)

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
Ashley 2024-05-31 00:47:02 +01:00 committed by GitHub
parent f7cf9832b9
commit 4fb3456e93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View file

@ -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"

View file

@ -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")