generated from ReVanced/revanced-patches-template
-
-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Tumblr): Add
Disable Ad-Free Banner
patch (#3091)
Co-authored-by: oSumAtrIX <[email protected]>
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/main/kotlin/app/revanced/patches/tumblr/annoyances/adfree/DisableAdFreeBannerPatch.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package app.revanced.patches.tumblr.annoyances.adfree | ||
|
||
import app.revanced.patcher.data.BytecodeContext | ||
import app.revanced.patcher.patch.BytecodePatch | ||
import app.revanced.patcher.patch.annotation.CompatiblePackage | ||
import app.revanced.patcher.patch.annotation.Patch | ||
import app.revanced.patches.tumblr.featureflags.OverrideFeatureFlagsPatch | ||
|
||
@Patch( | ||
name = "Disable Ad-Free Banner", | ||
description = "Disables the banner with a frog, prompting you to buy Tumblr Ad-Free.", | ||
dependencies = [OverrideFeatureFlagsPatch::class], | ||
compatiblePackages = [CompatiblePackage("com.tumblr")], | ||
) | ||
@Suppress("unused") | ||
object DisableAdFreeBannerPatch : BytecodePatch(emptySet()) { | ||
override fun execute(context: BytecodeContext) { | ||
// Disable the "AD_FREE_CTA_BANNER" ("Whether or not to show ad free prompt") feature flag. | ||
OverrideFeatureFlagsPatch.addOverride("adFreeCtaBanner", "false") | ||
} | ||
} |