From 56a087dbacf331ccadfe753cbc1ced77e318fc27 Mon Sep 17 00:00:00 2001 From: drobotk Date: Mon, 2 Mar 2026 23:26:26 +0100 Subject: [PATCH] fix: Use custom comparison block for strings in `anyOf` --- .../patches/music/layout/navigationbar/Fingerprints.kt | 4 ++-- .../patches/youtube/video/information/Fingerprints.kt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/patches/src/main/kotlin/app/revanced/patches/music/layout/navigationbar/Fingerprints.kt b/patches/src/main/kotlin/app/revanced/patches/music/layout/navigationbar/Fingerprints.kt index 90448053f5..f2169cbdca 100644 --- a/patches/src/main/kotlin/app/revanced/patches/music/layout/navigationbar/Fingerprints.kt +++ b/patches/src/main/kotlin/app/revanced/patches/music/layout/navigationbar/Fingerprints.kt @@ -13,8 +13,8 @@ internal val BytecodePatchContext.tabLayoutTextMethodMatch by composingFirstMeth parameterTypes("L") instructions( anyOf( - "FEmusic_search"(), // 8.49 and lower. - "FEsearch"() // 8.50+ + "FEmusic_search" { equals(it) }, // 8.49 and lower. Must use custom comparison block, otherwise string is added to stringsList for lookup + "FEsearch" { equals(it) } // 8.50+ ), // Hide navigation label. ResourceType.ID("text1"), diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/video/information/Fingerprints.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/video/information/Fingerprints.kt index 544cad4d0e..e5b5657a5e 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/video/information/Fingerprints.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/video/information/Fingerprints.kt @@ -60,9 +60,9 @@ internal fun ClassDef.getSeekMethod() = firstImmutableMethodDeclaratively { instructions( anyOf( // 20.xx - "Attempting to seek during an ad"(), + "Attempting to seek during an ad" { equals(it) }, // Must use custom comparison block, otherwise string is added to stringsList for lookup // 21.02+ - "currentPositionMs."() + "currentPositionMs." { equals(it) } ) ) }