feat(YouTube/Hide shorts components): use browseId instead of navigation bar index

- Sometimes the Shorts shelves are loaded first before the navigation bar index is updated, and under certain circumstances the Shorts shelves are not hidden properly.
- This issue can be resolved by checking the browser id instead of the navigation bar index.
This commit is contained in:
inotia00
2024-04-23 22:17:20 +09:00
parent 12e88259e2
commit 1765d0575f
7 changed files with 65 additions and 132 deletions

View File

@ -397,7 +397,7 @@ fun MutableClass.addFieldAndInstructions(
if (shouldAddConstructor) {
context.findClass(objectClass)!!.mutableClass.methods
.filter { method -> MethodUtil.isConstructor(method) }
.filter { method -> method.name == "<init>" }
.forEach { mutableMethod ->
mutableMethod.apply {
val initializeIndex = getTargetIndexWithMethodReferenceName("<init>")