generated from ReVanced/revanced-patches-template
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Twitter): Add
Disable chirp font
patch
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
src/main/kotlin/crimera/patches/twitter/misc/disablechirpfont/DisableChirpFontPatch.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,28 @@ | ||
package crimera.patches.twitter.misc.disablechirpfont | ||
|
||
import app.revanced.patcher.data.BytecodeContext | ||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions | ||
import app.revanced.patcher.patch.BytecodePatch | ||
import app.revanced.patcher.patch.annotation.CompatiblePackage | ||
import app.revanced.patcher.patch.annotation.Patch | ||
import crimera.patches.twitter.misc.disablechirpfont.fingerprints.ChirpFontFingerprint | ||
|
||
@Patch( | ||
name = "Disable chirp font", | ||
use = false, | ||
compatiblePackages = [CompatiblePackage("com.twitter.android")] | ||
) | ||
@Suppress("unused") | ||
object DisableChirpFontPatch: BytecodePatch( | ||
setOf(ChirpFontFingerprint) | ||
) { | ||
override fun execute(context: BytecodeContext) { | ||
ChirpFontFingerprint.result!!.mutableMethod.addInstructions( | ||
0, | ||
""" | ||
const v0, false | ||
return v0 | ||
""" | ||
) | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...kotlin/crimera/patches/twitter/misc/disablechirpfont/fingerprints/ChirpFontFingerprint.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,7 @@ | ||
package crimera.patches.twitter.misc.disablechirpfont.fingerprints | ||
|
||
import app.revanced.patcher.fingerprint.MethodFingerprint | ||
|
||
object ChirpFontFingerprint: MethodFingerprint( | ||
strings = listOf("af_ui_chirp_enabled") | ||
) |