Skip to content

Commit 5df580a

Browse files
committed
YouTube: support 20.41.xx
1 parent 327158d commit 5df580a

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

app/src/main/java/io/github/chsbuffer/revancedxposed/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ fun YoutubeHook.DisableResumingShortsOnStartup() {
1212
)
1313

1414
::userWasInShortsFingerprint.hookMethod(scopedHook(::userWasInShortsBuilderFingerprint.member) {
15+
val arg = ::userWasInShortsBuilderFingerprint.dexMethod.paramTypeNames.indexOf("boolean")
1516
before {
16-
it.args[0] =
17-
DisableResumingStartupShortsPlayerPatch.disableResumingStartupShortsPlayer(it.args[0] as Boolean)
17+
it.args[arg] =
18+
DisableResumingStartupShortsPlayerPatch.disableResumingStartupShortsPlayer(it.args[arg] as Boolean)
1819
}
1920
})
2021

app/src/main/java/io/github/chsbuffer/revancedxposed/youtube/layout/startupshortsreset/Fingerprints.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ val userWasInShortsFingerprint = fingerprint {
1212
}
1313

1414
val userWasInShortsBuilderFingerprint = findMethodDirect {
15-
userWasInShortsFingerprint().invokes.findMethod {
16-
matcher { paramTypes("boolean", "int") }
17-
}.single()
15+
val paramTypes = listOf("boolean", "int")
16+
userWasInShortsFingerprint().invokes.single {
17+
it.paramTypeNames.takeLast(2) == paramTypes
18+
}
1819
}
1920

2021
/**

app/src/main/java/io/github/chsbuffer/revancedxposed/youtube/shared/Fingerprints.kt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,7 @@ internal const val YOUTUBE_MAIN_ACTIVITY_CLASS_TYPE = "Lcom/google/android/apps/
1111

1212
val conversionContextFingerprintToString = fingerprint {
1313
parameters()
14-
strings(
15-
"ConversionContext{containerInternal=",
16-
", widthConstraint=",
17-
", heightConstraint=",
18-
", templateLoggerFactory=",
19-
", rootDisposableContainer=",
20-
", identifierProperty="
21-
)
14+
strings("ConversionContext{")
2215
}
2316

2417
val mainActivityConstructorFingerprint = fingerprint {

0 commit comments

Comments
 (0)