Skip to content

Commit 3e0d54f

Browse files
committed
LithoFilter: Updated to support YT 20.41.xx
Dynamically determine the correct field index for `identifierFieldData` by checking for the presence of a method containing the string `, pathInternal=`. This adapts to different constructor versions.
1 parent 9a74e63 commit 3e0d54f

File tree

1 file changed

+3
-1
lines changed
  • app/src/main/java/io/github/chsbuffer/revancedxposed/youtube/misc/litho/filter

1 file changed

+3
-1
lines changed

app/src/main/java/io/github/chsbuffer/revancedxposed/youtube/misc/litho/filter/Fingerprints.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,13 @@ val conversionContextClass = findClassDirect {
7070
conversionContextFingerprintToString(this).declaredClass!!
7171
}
7272
val identifierFieldData = findFieldDirect {
73+
val stringFieldIndex =
74+
if (findMethod { matcher { usingStrings(", pathInternal=") } }.any()) 2 else 1
7375
conversionContextClass(this).methods.single {
7476
it.isConstructor && it.paramCount != 0
7577
}.usingFields.filter {
7678
it.usingType == FieldUsingType.Write && it.field.typeName == String::class.java.name
77-
}[1].field
79+
}[stringFieldIndex].field
7880
}
7981

8082
val pathBuilderFieldData = findFieldDirect {

0 commit comments

Comments
 (0)