mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-25 18:34:07 +01:00
Compare commits
4 Commits
v2.178.0-d
...
v2.178.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
baeed05fbc | ||
|
|
badcadb8e6 | ||
|
|
e8f8746fce | ||
|
|
ed28862733 |
28
CHANGELOG.md
28
CHANGELOG.md
@@ -1,3 +1,31 @@
|
||||
# [2.178.0](https://github.com/revanced/revanced-patches/compare/v2.177.0...v2.178.0) (2023-06-21)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **boostforreddit:** use correct options ([ec39732](https://github.com/revanced/revanced-patches/commit/ec39732a05f7c4c3360b8ba42fe50fd60952e6ac))
|
||||
* don't include all Litho patches, when not included ([fc69491](https://github.com/revanced/revanced-patches/commit/fc69491dfe4b119d46dd3da27b556e55fe0cecfb))
|
||||
* **googlerecorder/remove-device-restrictions:** add missing app constraint ([#2438](https://github.com/revanced/revanced-patches/issues/2438)) ([d5efe26](https://github.com/revanced/revanced-patches/commit/d5efe26f8959cde75dd3865ec3c2df4b05210e4a))
|
||||
* **youtube/comments:** add missing filter ([#2423](https://github.com/revanced/revanced-patches/issues/2423)) ([cab04b3](https://github.com/revanced/revanced-patches/commit/cab04b3a56cfc5bf00b7c6fcf6f86ab75aa5d4fd))
|
||||
* **youtube/hide-album-cards:** call correct integrations method ([0dbffaa](https://github.com/revanced/revanced-patches/commit/0dbffaae7d6dcb7050a9ea6e3c771839bcfdfbe1))
|
||||
* **youtube:** separate `hide-ads` to `hide-layout-components` patch ([7e0417f](https://github.com/revanced/revanced-patches/commit/7e0417f6728fa7b79a9d8cbcfd3ccba484a5567d))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **boostforreddit:** add `change-oauth-client-id` patch ([3dbc4bd](https://github.com/revanced/revanced-patches/commit/3dbc4bd49df1656893ef69c68550a2deb6a92cb7))
|
||||
* **google-recorder:** add `remove-device-restrictions` patch ([ef96ed1](https://github.com/revanced/revanced-patches/commit/ef96ed124e12091dde34124eabd8be9f2bb9280c))
|
||||
* **twitch:** 15.4.1 support ([#2462](https://github.com/revanced/revanced-patches/issues/2462)) ([826ed49](https://github.com/revanced/revanced-patches/commit/826ed49c7ca5a00e383b743f88f75dbfc00adb43))
|
||||
* **youtube-music:** remove version compatibility constraints ([276af14](https://github.com/revanced/revanced-patches/commit/276af1415a4d354c62fe6259b6559bca1fa84f08))
|
||||
* **youtube/hide-layout-components:** separate hiding expandable chips and chapters ([3fb1ce9](https://github.com/revanced/revanced-patches/commit/3fb1ce9f9af150b784e42aaf5b419bb123c08375))
|
||||
|
||||
# [2.178.0-dev.9](https://github.com/revanced/revanced-patches/compare/v2.178.0-dev.8...v2.178.0-dev.9) (2023-06-21)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **twitch:** 15.4.1 support ([#2462](https://github.com/revanced/revanced-patches/issues/2462)) ([826ed49](https://github.com/revanced/revanced-patches/commit/826ed49c7ca5a00e383b743f88f75dbfc00adb43))
|
||||
|
||||
# [2.178.0-dev.8](https://github.com/revanced/revanced-patches/compare/v2.178.0-dev.7...v2.178.0-dev.8) (2023-06-20)
|
||||
|
||||
|
||||
|
||||
64
README.md
64
README.md
@@ -119,13 +119,13 @@ The official ReVanced Patches.
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `auto-claim-channel-points` | Automatically claim Channel Points. | all |
|
||||
| `block-audio-ads` | Blocks audio ads in streams and VODs. | 14.6.1 |
|
||||
| `block-embedded-ads` | Blocks embedded stream ads using services like TTV.lol or PurpleAdBlocker. | 14.6.1 |
|
||||
| `block-video-ads` | Blocks video ads in streams and VODs. | 14.6.1 |
|
||||
| `auto-claim-channel-points` | Automatically claim Channel Points. | 15.4.1 |
|
||||
| `block-audio-ads` | Blocks audio ads in streams and VODs. | 15.4.1 |
|
||||
| `block-embedded-ads` | Blocks embedded stream ads using services like TTV.lol or PurpleAdBlocker. | 15.4.1 |
|
||||
| `block-video-ads` | Blocks video ads in streams and VODs. | 15.4.1 |
|
||||
| `debug-mode` | Enables Twitch's internal debugging mode. | all |
|
||||
| `settings` | Adds settings menu to Twitch. | all |
|
||||
| `show-deleted-messages` | Shows deleted chat messages behind a clickable spoiler. | all |
|
||||
| `show-deleted-messages` | Shows deleted chat messages behind a clickable spoiler. | 15.4.1 |
|
||||
</details>
|
||||
|
||||
### [📦 `com.twitter.android`](https://play.google.com/store/apps/details?id=com.twitter.android)
|
||||
@@ -340,12 +340,12 @@ The official ReVanced Patches.
|
||||
| `unlock-prime` | Unlocks Nova Prime and all functions of the app. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `tv.trakt.trakt`](https://play.google.com/store/apps/details?id=tv.trakt.trakt)
|
||||
### [📦 `com.candylink.openvpn`](https://play.google.com/store/apps/details?id=com.candylink.openvpn)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-pro` | Unlocks pro features. | all |
|
||||
| `unlock-pro` | Unlocks premium features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.zombodroid.MemeGenerator`](https://play.google.com/store/apps/details?id=com.zombodroid.MemeGenerator)
|
||||
@@ -356,6 +356,22 @@ The official ReVanced Patches.
|
||||
| `unlock-pro` | Unlocks pro features. | 4.6377 |
|
||||
</details>
|
||||
|
||||
### [📦 `com.wakdev.apps.nfctools.se`](https://play.google.com/store/apps/details?id=com.wakdev.apps.nfctools.se)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-pro` | Unlocks all pro features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `ginlemon.iconpackstudio`](https://play.google.com/store/apps/details?id=ginlemon.iconpackstudio)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-pro` | Unlocks all pro features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.ithebk.expensemanager`](https://play.google.com/store/apps/details?id=com.ithebk.expensemanager)
|
||||
<details>
|
||||
|
||||
@@ -372,22 +388,6 @@ The official ReVanced Patches.
|
||||
| `unlock-pro` | Unlocks pro features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.awedea.nyx`](https://play.google.com/store/apps/details?id=com.awedea.nyx)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-pro` | Unlocks all pro features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `ginlemon.iconpackstudio`](https://play.google.com/store/apps/details?id=ginlemon.iconpackstudio)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-pro` | Unlocks all pro features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `org.totschnig.myexpenses`](https://play.google.com/store/apps/details?id=org.totschnig.myexpenses)
|
||||
<details>
|
||||
|
||||
@@ -396,7 +396,7 @@ The official ReVanced Patches.
|
||||
| `unlock-pro` | Unlocks all professional features. | 3.4.9 |
|
||||
</details>
|
||||
|
||||
### [📦 `com.wakdev.apps.nfctools.se`](https://play.google.com/store/apps/details?id=com.wakdev.apps.nfctools.se)
|
||||
### [📦 `com.awedea.nyx`](https://play.google.com/store/apps/details?id=com.awedea.nyx)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
@@ -404,6 +404,14 @@ The official ReVanced Patches.
|
||||
| `unlock-pro` | Unlocks all pro features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `tv.trakt.trakt`](https://play.google.com/store/apps/details?id=tv.trakt.trakt)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-pro` | Unlocks pro features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `co.windyapp.android`](https://play.google.com/store/apps/details?id=co.windyapp.android)
|
||||
<details>
|
||||
|
||||
@@ -412,14 +420,6 @@ The official ReVanced Patches.
|
||||
| `unlock-pro` | Unlocks all pro features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.candylink.openvpn`](https://play.google.com/store/apps/details?id=com.candylink.openvpn)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `unlock-pro` | Unlocks premium features. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.ticktick.task`](https://play.google.com/store/apps/details?id=com.ticktick.task)
|
||||
<details>
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
kotlin.code.style = official
|
||||
version = 2.178.0-dev.8
|
||||
version = 2.178.0
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -3,20 +3,7 @@ package app.revanced.patches.twitch.ad.audio.annotations
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[
|
||||
Package(
|
||||
"tv.twitch.android.app", arrayOf(
|
||||
"14.3.3",
|
||||
"14.4.0",
|
||||
"14.5.0",
|
||||
"14.5.2",
|
||||
"14.6.0",
|
||||
"14.6.1"
|
||||
)
|
||||
)
|
||||
]
|
||||
)
|
||||
@Compatibility([Package("tv.twitch.android.app", arrayOf("15.4.1"))])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class AudioAdsCompatibility
|
||||
|
||||
|
||||
@@ -3,20 +3,7 @@ package app.revanced.patches.twitch.ad.embedded.annotations
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[
|
||||
Package(
|
||||
"tv.twitch.android.app", arrayOf(
|
||||
"14.3.3",
|
||||
"14.4.0",
|
||||
"14.5.0",
|
||||
"14.5.2",
|
||||
"14.6.0",
|
||||
"14.6.1"
|
||||
)
|
||||
)
|
||||
]
|
||||
)
|
||||
@Compatibility([Package("tv.twitch.android.app", arrayOf("15.4.1"))])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class EmbeddedAdsCompatibility
|
||||
|
||||
|
||||
@@ -3,20 +3,7 @@ package app.revanced.patches.twitch.ad.video.annotations
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[
|
||||
Package(
|
||||
"tv.twitch.android.app", arrayOf(
|
||||
"14.3.3",
|
||||
"14.4.0",
|
||||
"14.5.0",
|
||||
"14.5.2",
|
||||
"14.6.0",
|
||||
"14.6.1"
|
||||
)
|
||||
)
|
||||
]
|
||||
)
|
||||
@Compatibility([Package("tv.twitch.android.app", arrayOf("15.4.1"))])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class VideoAdsCompatibility
|
||||
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
package app.revanced.patches.twitch.ad.video.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
|
||||
object CheckAdEligibilityLambdaFingerprint : MethodFingerprint(
|
||||
"L",
|
||||
AccessFlags.PRIVATE or AccessFlags.FINAL or AccessFlags.STATIC,
|
||||
listOf("L", "L", "L"),
|
||||
returnType = "Lio/reactivex/Single;",
|
||||
parameters = listOf("L"),
|
||||
customFingerprint = { method, _ ->
|
||||
method.definingClass.endsWith("AdEligibilityFetcher;") &&
|
||||
method.name.contains("shouldRequestAd")
|
||||
method.definingClass.endsWith("/AdEligibilityFetcher;")
|
||||
&& method.name == "shouldRequestAd"
|
||||
}
|
||||
)
|
||||
@@ -1,10 +1,11 @@
|
||||
package app.revanced.patches.twitch.ad.video.fingerprints
|
||||
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object ContentConfigShowAdsFingerprint : MethodFingerprint(
|
||||
returnType = "Z",
|
||||
parameters = listOf(),
|
||||
customFingerprint = { method, _ ->
|
||||
method.definingClass.endsWith("ContentConfigData;") && method.name == "getShowAds"
|
||||
method.definingClass.endsWith("/ContentConfigData;") && method.name == "getShowAds"
|
||||
}
|
||||
)
|
||||
@@ -3,6 +3,8 @@ package app.revanced.patches.twitch.ad.video.fingerprints
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object GetReadyToShowAdFingerprint : MethodFingerprint(
|
||||
returnType = "Ltv/twitch/android/core/mvp/presenter/StateAndAction;",
|
||||
parameters = listOf("L", "L"),
|
||||
customFingerprint = { method, _ ->
|
||||
method.definingClass.endsWith("/StreamDisplayAdsPresenter;") && method.name == "getReadyToShowAdOrAbort"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.twitch.ad.video.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
@@ -86,7 +87,7 @@ class VideoAdsPatch : AbstractAdPatch(
|
||||
)
|
||||
|
||||
// Pretend our player is ineligible for all ads
|
||||
with(CheckAdEligibilityLambdaFingerprint.result!!) {
|
||||
CheckAdEligibilityLambdaFingerprint.result?.apply {
|
||||
mutableMethod.addInstructionsWithLabels(
|
||||
0,
|
||||
"""
|
||||
@@ -98,9 +99,9 @@ class VideoAdsPatch : AbstractAdPatch(
|
||||
""",
|
||||
ExternalLabel(skipLabelName, mutableMethod.getInstruction(0))
|
||||
)
|
||||
}
|
||||
} ?: return CheckAdEligibilityLambdaFingerprint.toErrorResult()
|
||||
|
||||
with(GetReadyToShowAdFingerprint.result!!) {
|
||||
GetReadyToShowAdFingerprint.result?.apply {
|
||||
val adFormatDeclined = "Ltv/twitch/android/shared/display/ads/theatre/StreamDisplayAdsPresenter\$Action\$AdFormatDeclined;"
|
||||
mutableMethod.addInstructionsWithLabels(
|
||||
0,
|
||||
@@ -113,10 +114,10 @@ class VideoAdsPatch : AbstractAdPatch(
|
||||
""",
|
||||
ExternalLabel(skipLabelName, mutableMethod.getInstruction(0))
|
||||
)
|
||||
}
|
||||
} ?: return GetReadyToShowAdFingerprint.toErrorResult()
|
||||
|
||||
// Spoof showAds JSON field
|
||||
with(ContentConfigShowAdsFingerprint.result!!) {
|
||||
ContentConfigShowAdsFingerprint.result?.apply {
|
||||
mutableMethod.addInstructions(0, """
|
||||
${createConditionInstructions()}
|
||||
const/4 v0, 0
|
||||
@@ -124,7 +125,7 @@ class VideoAdsPatch : AbstractAdPatch(
|
||||
return v0
|
||||
"""
|
||||
)
|
||||
}
|
||||
} ?: return ContentConfigShowAdsFingerprint.toErrorResult()
|
||||
|
||||
SettingsPatch.PreferenceScreen.ADS.CLIENT_SIDE.addPreferences(
|
||||
SwitchPreference(
|
||||
|
||||
@@ -3,7 +3,7 @@ package app.revanced.patches.twitch.chat.antidelete.annotations
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("tv.twitch.android.app")])
|
||||
@Compatibility([Package("tv.twitch.android.app", arrayOf("15.4.1"))])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class ShowDeletedMessagesCompatibility
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.twitch.chat.antidelete.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
@@ -44,7 +45,7 @@ class ShowDeletedMessagesPatch : BytecodePatch(
|
||||
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
// Spoiler mode: Force set hasModAccess member to true in constructor
|
||||
DeletedMessageClickableSpanCtorFingerprint.result!!.mutableMethod.apply {
|
||||
DeletedMessageClickableSpanCtorFingerprint.result?.mutableMethod?.apply {
|
||||
addInstructionsWithLabels(
|
||||
implementation!!.instructions.lastIndex, /* place in front of return-void */
|
||||
"""
|
||||
@@ -54,14 +55,14 @@ class ShowDeletedMessagesPatch : BytecodePatch(
|
||||
""",
|
||||
ExternalLabel("no_spoiler", getInstruction(implementation!!.instructions.lastIndex))
|
||||
)
|
||||
}
|
||||
} ?: return DeletedMessageClickableSpanCtorFingerprint.toErrorResult()
|
||||
|
||||
// Spoiler mode: Disable setHasModAccess setter
|
||||
SetHasModAccessFingerprint.result!!.mutableMethod.addInstruction(0, "return-void")
|
||||
|
||||
SetHasModAccessFingerprint.result?.mutableMethod?.addInstruction(0, "return-void")
|
||||
?: return SetHasModAccessFingerprint.toErrorResult()
|
||||
|
||||
// Cross-out mode: Reformat span of deleted message
|
||||
ChatUtilCreateDeletedSpanFingerprint.result!!.mutableMethod.apply {
|
||||
ChatUtilCreateDeletedSpanFingerprint.result?.mutableMethod?.apply {
|
||||
addInstructionsWithLabels(
|
||||
0,
|
||||
"""
|
||||
@@ -72,7 +73,7 @@ class ShowDeletedMessagesPatch : BytecodePatch(
|
||||
""",
|
||||
ExternalLabel("no_reformat", getInstruction(0))
|
||||
)
|
||||
}
|
||||
} ?: return ChatUtilCreateDeletedSpanFingerprint.toErrorResult()
|
||||
|
||||
SettingsPatch.PreferenceScreen.CHAT.GENERAL.addPreferences(
|
||||
ListPreference(
|
||||
|
||||
@@ -3,6 +3,6 @@ package app.revanced.patches.twitch.chat.autoclaim.annotations
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("tv.twitch.android.app")])
|
||||
@Compatibility([Package("tv.twitch.android.app", arrayOf("15.4.1"))])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class AutoClaimChannelPointsCompatibility
|
||||
@@ -65,6 +65,7 @@ class AutoClaimChannelPointPatch : BytecodePatch(
|
||||
ExternalLabel("auto_claim", getInstruction(lastIndex))
|
||||
)
|
||||
} ?: return CommunityPointsButtonViewDelegateFingerprint.toErrorResult()
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package app.revanced.patches.twitch.debug.fingerprints
|
||||
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object IsDebugConfigEnabledFingerprint : MethodFingerprint(
|
||||
customFingerprint = { methodDef, _ ->
|
||||
methodDef.definingClass.endsWith("BuildConfigUtil;") && methodDef.name == "isDebugConfigEnabled"
|
||||
methodDef.definingClass.endsWith("/BuildConfigUtil;") && methodDef.name == "isDebugConfigEnabled"
|
||||
}
|
||||
)
|
||||
@@ -1,10 +1,9 @@
|
||||
package app.revanced.patches.twitch.debug.fingerprints
|
||||
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object IsOmVerificationEnabledFingerprint : MethodFingerprint(
|
||||
customFingerprint = { methodDef, _ ->
|
||||
methodDef.definingClass.endsWith("BuildConfigUtil;") && methodDef.name == "isOmVerificationEnabled"
|
||||
methodDef.definingClass.endsWith("/BuildConfigUtil;") && methodDef.name == "isOmVerificationEnabled"
|
||||
}
|
||||
)
|
||||
@@ -1,10 +1,9 @@
|
||||
package app.revanced.patches.twitch.debug.fingerprints
|
||||
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object ShouldShowDebugOptionsFingerprint : MethodFingerprint(
|
||||
customFingerprint = { methodDef, _ ->
|
||||
methodDef.definingClass.endsWith("BuildConfigUtil;") && methodDef.name == "shouldShowDebugOptions"
|
||||
methodDef.definingClass.endsWith("/BuildConfigUtil;") && methodDef.name == "shouldShowDebugOptions"
|
||||
}
|
||||
)
|
||||
@@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.twitch.debug.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
@@ -38,18 +39,16 @@ class DebugModePatch : BytecodePatch(
|
||||
IsOmVerificationEnabledFingerprint,
|
||||
ShouldShowDebugOptionsFingerprint
|
||||
).forEach {
|
||||
with(it.result!!) {
|
||||
with(mutableMethod) {
|
||||
addInstructions(
|
||||
0,
|
||||
"""
|
||||
invoke-static {}, Lapp/revanced/twitch/patches/DebugModePatch;->isDebugModeEnabled()Z
|
||||
move-result v0
|
||||
return v0
|
||||
"""
|
||||
)
|
||||
}
|
||||
}
|
||||
it.result?.mutableMethod?.apply {
|
||||
addInstructions(
|
||||
0,
|
||||
"""
|
||||
invoke-static {}, Lapp/revanced/twitch/patches/DebugModePatch;->isDebugModeEnabled()Z
|
||||
move-result v0
|
||||
return v0
|
||||
"""
|
||||
)
|
||||
} ?: return it.toErrorResult()
|
||||
}
|
||||
|
||||
SettingsPatch.PreferenceScreen.MISC.OTHER.addPreferences(
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.twitch.misc.settings.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
@@ -45,7 +46,7 @@ class SettingsPatch : BytecodePatch(
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
// Hook onCreate to handle fragment creation
|
||||
with(SettingsActivityOnCreateFingerprint.result!!) {
|
||||
SettingsActivityOnCreateFingerprint.result?.apply {
|
||||
val insertIndex = mutableMethod.implementation!!.instructions.size - 2
|
||||
mutableMethod.addInstructionsWithLabels(
|
||||
insertIndex,
|
||||
@@ -57,20 +58,20 @@ class SettingsPatch : BytecodePatch(
|
||||
""",
|
||||
ExternalLabel("no_rv_settings_init", mutableMethod.getInstruction(insertIndex))
|
||||
)
|
||||
}
|
||||
} ?: return SettingsActivityOnCreateFingerprint.toErrorResult()
|
||||
|
||||
// Create new menu item for settings menu
|
||||
with(SettingsMenuItemEnumFingerprint.result!!) {
|
||||
SettingsMenuItemEnumFingerprint.result?.apply {
|
||||
injectMenuItem(
|
||||
REVANCED_SETTINGS_MENU_ITEM_NAME,
|
||||
REVANCED_SETTINGS_MENU_ITEM_ID,
|
||||
REVANCED_SETTINGS_MENU_ITEM_TITLE_RES,
|
||||
REVANCED_SETTINGS_MENU_ITEM_ICON_RES
|
||||
)
|
||||
}
|
||||
} ?: return SettingsMenuItemEnumFingerprint.toErrorResult()
|
||||
|
||||
// Intercept settings menu creation and add new menu item
|
||||
with(MenuGroupsUpdatedFingerprint.result!!) {
|
||||
MenuGroupsUpdatedFingerprint.result?.apply {
|
||||
mutableMethod.addInstructions(
|
||||
0,
|
||||
"""
|
||||
@@ -79,10 +80,10 @@ class SettingsPatch : BytecodePatch(
|
||||
move-result-object p1
|
||||
"""
|
||||
)
|
||||
}
|
||||
} ?: return MenuGroupsUpdatedFingerprint.toErrorResult()
|
||||
|
||||
// Intercept onclick events for the settings menu
|
||||
with(MenuGroupsOnClickFingerprint.result!!) {
|
||||
MenuGroupsOnClickFingerprint.result?.apply {
|
||||
val insertIndex = 0
|
||||
mutableMethod.addInstructionsWithLabels(
|
||||
insertIndex,
|
||||
@@ -96,7 +97,7 @@ class SettingsPatch : BytecodePatch(
|
||||
""",
|
||||
ExternalLabel("no_rv_settings_onclick", mutableMethod.getInstruction(insertIndex))
|
||||
)
|
||||
}
|
||||
} ?: return MenuGroupsOnClickFingerprint.toErrorResult()
|
||||
|
||||
addString("revanced_settings", "ReVanced Settings", false)
|
||||
addString("revanced_reboot_message", "Twitch needs to restart to apply your changes. Restart now?", false)
|
||||
|
||||
Reference in New Issue
Block a user