mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 13:17:46 +02:00
refactor: Migrate to new extension methods for String.toInstruction(...)
and String.toInstructions(...)
(#45)
This commit is contained in:
@ -36,11 +36,11 @@ class IntegrationsPatch : BytecodePatch(
|
||||
val implementation = result.method.implementation!!
|
||||
val count = implementation.registerCount - 1
|
||||
|
||||
implementation.addInstructions(
|
||||
result.method.addInstructions(
|
||||
result.scanResult.endIndex + 1, """
|
||||
invoke-static {v$count}, Lpl/jakubweg/StringRef;->setContext(Landroid/content/Context;)V
|
||||
sput-object v$count, Lapp/revanced/integrations/Globals;->context:Landroid/content/Context;
|
||||
""".trimIndent().toInstructions()
|
||||
"""
|
||||
)
|
||||
|
||||
val classDef = result.definingClassProxy.resolve()
|
||||
|
Reference in New Issue
Block a user