forked from inotia00/revanced-patches
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(YouTube/Hide feed components): add
Hide related videos
setting
- Loading branch information
Showing
5 changed files
with
117 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...revanced/patches/youtube/feed/components/fingerprints/EngagementPanelUpdateFingerprint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package app.revanced.patches.youtube.feed.components.fingerprints | ||
|
||
import app.revanced.patcher.extensions.or | ||
import app.revanced.patcher.fingerprint.MethodFingerprint | ||
import app.revanced.util.getReference | ||
import app.revanced.util.indexOfFirstInstruction | ||
import com.android.tools.smali.dexlib2.AccessFlags | ||
import com.android.tools.smali.dexlib2.Opcode | ||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference | ||
|
||
internal object EngagementPanelUpdateFingerprint : MethodFingerprint( | ||
returnType = "V", | ||
accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL, | ||
parameters = listOf("L", "Z"), | ||
customFingerprint = { methodDef, _ -> | ||
methodDef.indexOfFirstInstruction { | ||
opcode == Opcode.INVOKE_VIRTUAL && | ||
getReference<MethodReference>().toString() == "Ljava/util/ArrayDeque;->pop()Ljava/lang/Object;" | ||
} >= 0 | ||
} | ||
) |
19 changes: 19 additions & 0 deletions
19
.../patches/youtube/feed/components/fingerprints/LinearLayoutManagerItemCountsFingerprint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package app.revanced.patches.youtube.feed.components.fingerprints | ||
|
||
import app.revanced.patcher.fingerprint.MethodFingerprint | ||
import com.android.tools.smali.dexlib2.AccessFlags | ||
import com.android.tools.smali.dexlib2.Opcode | ||
|
||
internal object LinearLayoutManagerItemCountsFingerprint : MethodFingerprint( | ||
returnType = "I", | ||
accessFlags = AccessFlags.FINAL.value, | ||
parameters = listOf("L", "L", "L", "Z"), | ||
opcodes = listOf( | ||
Opcode.IF_NEZ, | ||
Opcode.IF_LEZ, | ||
Opcode.INVOKE_VIRTUAL, | ||
), | ||
customFingerprint = { methodDef, _ -> | ||
methodDef.definingClass == "Landroid/support/v7/widget/LinearLayoutManager;" | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters