diff --git a/app/src/main/java/app/revanced/twitter/patches/hook/json/JsonHookPatch.kt b/app/src/main/java/app/revanced/twitter/patches/hook/json/JsonHookPatch.kt index 9817b6aa..d8c47d71 100644 --- a/app/src/main/java/app/revanced/twitter/patches/hook/json/JsonHookPatch.kt +++ b/app/src/main/java/app/revanced/twitter/patches/hook/json/JsonHookPatch.kt @@ -1,5 +1,6 @@ package app.revanced.twitter.patches.hook.json +import app.revanced.twitter.patches.hook.patch.dummy.DummyHook import app.revanced.twitter.utils.json.JsonUtils.parseJson import app.revanced.twitter.utils.stream.StreamUtils import org.json.JSONException @@ -7,8 +8,9 @@ import java.io.IOException import java.io.InputStream object JsonHookPatch { + // Additional hooks added by corresponding patch. private val hooks = buildList { - // Modified by corresponding patch. + add(DummyHook) } @JvmStatic diff --git a/app/src/main/java/app/revanced/twitter/patches/hook/patch/dummy/DummyHook.kt b/app/src/main/java/app/revanced/twitter/patches/hook/patch/dummy/DummyHook.kt new file mode 100644 index 00000000..56a7a08e --- /dev/null +++ b/app/src/main/java/app/revanced/twitter/patches/hook/patch/dummy/DummyHook.kt @@ -0,0 +1,14 @@ +package app.revanced.twitter.patches.hook.patch.dummy + +import app.revanced.twitter.patches.hook.json.BaseJsonHook +import app.revanced.twitter.patches.hook.json.JsonHookPatch +import org.json.JSONObject + +/** + * Dummy hook to reserve a register in [JsonHookPatch.hooks] list. + */ +object DummyHook : BaseJsonHook() { + override fun apply(json: JSONObject) { + // Do nothing. + } +} \ No newline at end of file