From e8c9a91a92fafcc79ce521f62c3865827df55d0f Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 22 Feb 2023 05:38:14 +0100 Subject: [PATCH] feat(twitter): `hide-recommended-users` patch Signed-off-by: oSumAtrIX --- .../HideRecommendedUsersCompatibility.kt | 13 +++++++++++ .../patch/HideRecommendedUsersPatch.kt | 23 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 src/main/kotlin/app/revanced/patches/twitter/misc/hook/patch/recommendation/annotations/HideRecommendedUsersCompatibility.kt create mode 100644 src/main/kotlin/app/revanced/patches/twitter/misc/hook/patch/recommendation/patch/HideRecommendedUsersPatch.kt diff --git a/src/main/kotlin/app/revanced/patches/twitter/misc/hook/patch/recommendation/annotations/HideRecommendedUsersCompatibility.kt b/src/main/kotlin/app/revanced/patches/twitter/misc/hook/patch/recommendation/annotations/HideRecommendedUsersCompatibility.kt new file mode 100644 index 000000000..d01dbf304 --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/twitter/misc/hook/patch/recommendation/annotations/HideRecommendedUsersCompatibility.kt @@ -0,0 +1,13 @@ +package app.revanced.patches.twitter.misc.hook.patch.recommendation.annotations + +import app.revanced.patcher.annotation.Compatibility +import app.revanced.patcher.annotation.Package + +@Compatibility( + [Package( + "com.twitter.android" + )] +) +@Target(AnnotationTarget.CLASS) +@Retention(AnnotationRetention.RUNTIME) +internal annotation class HideRecommendedUsersCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/twitter/misc/hook/patch/recommendation/patch/HideRecommendedUsersPatch.kt b/src/main/kotlin/app/revanced/patches/twitter/misc/hook/patch/recommendation/patch/HideRecommendedUsersPatch.kt new file mode 100644 index 000000000..a6ea294fb --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/twitter/misc/hook/patch/recommendation/patch/HideRecommendedUsersPatch.kt @@ -0,0 +1,23 @@ +package app.revanced.patches.twitter.misc.hook.patch.recommendation.patch + +import app.revanced.patcher.annotation.Description +import app.revanced.patcher.annotation.Name +import app.revanced.patcher.annotation.Version +import app.revanced.patcher.patch.annotations.DependsOn +import app.revanced.patcher.patch.annotations.Patch +import app.revanced.patches.twitter.misc.hook.json.patch.JsonHookPatch +import app.revanced.patches.twitter.misc.hook.patch.BaseHookPatchPatch +import app.revanced.patches.twitter.misc.hook.patch.recommendation.annotations.HideRecommendedUsersCompatibility + +@Patch +@Name("hide-recommended-users") +@DependsOn([JsonHookPatch::class]) +@Description("Hides recommended users.") +@HideRecommendedUsersCompatibility +@Version("0.0.1") +class HideRecommendedUsersPatch : BaseHookPatchPatch(HOOK_CLASS_DESCRIPTOR) { + private companion object { + const val HOOK_CLASS_DESCRIPTOR = + "Lapp/revanced/twitter/patches/hook/patch/recommendation/RecommendedUsersHook;" + } +} \ No newline at end of file