From 5be25cde4b34d58ced35a7edbb499477b538b748 Mon Sep 17 00:00:00 2001 From: rstular Date: Mon, 8 May 2023 01:47:32 +0200 Subject: [PATCH] fix: account fo breaking changes from ReVanced Patcher (#2103) RE: revanced/revanced-patcher/commit/6f6434fdb191fa4150d07ef1ec829fe570b3c664 --- .../ticktick/misc/themeunlock/patch/UnlockThemePatch.kt | 2 +- .../twelvewidgets/unlock/patch/UnlockPaidWidgetsPatch.kt | 2 +- .../layout/hideviews/patch/HideViewsBytecodePatch.kt | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/ticktick/misc/themeunlock/patch/UnlockThemePatch.kt b/src/main/kotlin/app/revanced/patches/ticktick/misc/themeunlock/patch/UnlockThemePatch.kt index 8cc8fdd9c..d61f3539c 100644 --- a/src/main/kotlin/app/revanced/patches/ticktick/misc/themeunlock/patch/UnlockThemePatch.kt +++ b/src/main/kotlin/app/revanced/patches/ticktick/misc/themeunlock/patch/UnlockThemePatch.kt @@ -36,7 +36,7 @@ class UnlockProPatch : BytecodePatch( ) val setThemeMethod = SetThemeFingerprint.result!!.mutableMethod - setThemeMethod.removeInstructions(0, 9) + setThemeMethod.removeInstructions(0, 10) return PatchResultSuccess() } diff --git a/src/main/kotlin/app/revanced/patches/twelvewidgets/unlock/patch/UnlockPaidWidgetsPatch.kt b/src/main/kotlin/app/revanced/patches/twelvewidgets/unlock/patch/UnlockPaidWidgetsPatch.kt index 8a188600f..16455a4c5 100644 --- a/src/main/kotlin/app/revanced/patches/twelvewidgets/unlock/patch/UnlockPaidWidgetsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/twelvewidgets/unlock/patch/UnlockPaidWidgetsPatch.kt @@ -38,7 +38,7 @@ class UnlockPaidWidgetsPatch : BytecodePatch( fingerprint.result?.mutableMethod ?: return fingerprint.toErrorResult() }.forEach { method -> method.apply { - removeInstructions(4, 2) + removeInstructions(4, 3) addInstructions( implementation?.instructions?.size!!, """ const/4 v1, 0x0 diff --git a/src/main/kotlin/app/revanced/patches/twitter/layout/hideviews/patch/HideViewsBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/twitter/layout/hideviews/patch/HideViewsBytecodePatch.kt index 3752d0798..b8cb63652 100644 --- a/src/main/kotlin/app/revanced/patches/twitter/layout/hideviews/patch/HideViewsBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/twitter/layout/hideviews/patch/HideViewsBytecodePatch.kt @@ -61,7 +61,7 @@ class HideViewsBytecodePatch : BytecodePatch( TweetStatsContainerConstructorFingerprint, returnFingerprint ) { patternScanResult, method -> - method.removeInstructions(patternScanResult.endIndex - 3, 2) + method.removeInstructions(patternScanResult.endIndex - 3, 3) } } @@ -80,13 +80,13 @@ class HideViewsBytecodePatch : BytecodePatch( TweetStatsContainerWrapperConstructorFingerprint, wrapperReturnFingerprint ) { patternScanResult, method -> - method.removeInstructions(patternScanResult.startIndex - 4, 3) + method.removeInstructions(patternScanResult.startIndex - 4, 4) } } private fun removeViewDelegateBinderSubscription() { transformMethod(TweetStatsViewDelegateBinderFingerprint) { result, method -> - method.removeInstructions(result.scanResult.patternScanResult!!.startIndex - 4, 9) + method.removeInstructions(result.scanResult.patternScanResult!!.startIndex - 4, 10) } }