mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-09 19:14:37 +02:00
feat(YouTube/Return YouTube Dislike): apply fingerprint compatible with the wider version
This commit is contained in:
parent
3a37ce604f
commit
23700d1903
@ -16,6 +16,7 @@ import app.revanced.patches.youtube.utils.returnyoutubedislike.shorts.fingerprin
|
|||||||
import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||||
import app.revanced.util.exception
|
import app.revanced.util.exception
|
||||||
import app.revanced.util.getTargetIndexReversed
|
import app.revanced.util.getTargetIndexReversed
|
||||||
|
import app.revanced.util.getTargetIndexWithReference
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
@ -74,7 +75,7 @@ object ReturnYouTubeDislikeShortsPatch : BytecodePatch(
|
|||||||
if (SettingsPatch.upward1834) {
|
if (SettingsPatch.upward1834) {
|
||||||
TextComponentSpecFingerprint.result?.let {
|
TextComponentSpecFingerprint.result?.let {
|
||||||
it.mutableMethod.apply {
|
it.mutableMethod.apply {
|
||||||
val insertIndex = it.scanResult.patternScanResult!!.startIndex
|
val insertIndex = getTargetIndexWithReference("Landroid/text/SpannableString;->valueOf(Ljava/lang/CharSequence;)Landroid/text/SpannableString;")
|
||||||
|
|
||||||
val charSequenceRegister =
|
val charSequenceRegister =
|
||||||
getInstruction<FiveRegisterInstruction>(insertIndex).registerC
|
getInstruction<FiveRegisterInstruction>(insertIndex).registerC
|
||||||
|
@ -1,14 +1,8 @@
|
|||||||
package app.revanced.patches.youtube.utils.returnyoutubedislike.shorts.fingerprints
|
package app.revanced.patches.youtube.utils.returnyoutubedislike.shorts.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
|
|
||||||
object TextComponentSpecFingerprint : MethodFingerprint(
|
object TextComponentSpecFingerprint : MethodFingerprint(
|
||||||
returnType = "Ljava/lang/CharSequence;",
|
returnType = "Ljava/lang/CharSequence;",
|
||||||
opcodes = listOf(
|
|
||||||
Opcode.INVOKE_STATIC,
|
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
|
||||||
Opcode.CONST_4
|
|
||||||
),
|
|
||||||
strings = listOf("Failed to set PB Style Run Extension in TextComponentSpec. Extension id: %s")
|
strings = listOf("Failed to set PB Style Run Extension in TextComponentSpec. Extension id: %s")
|
||||||
)
|
)
|
Loading…
x
Reference in New Issue
Block a user