diff --git a/patches/src/main/kotlin/app/revanced/patches/pandora/misc/EnableUnlimitedSkipsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/pandora/misc/EnableUnlimitedSkipsPatch.kt index cfb18c439..98b19c527 100644 --- a/patches/src/main/kotlin/app/revanced/patches/pandora/misc/EnableUnlimitedSkipsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/pandora/misc/EnableUnlimitedSkipsPatch.kt @@ -1,15 +1,15 @@ package app.revanced.patches.pandora.misc -import app.revanced.patcher.patch.bytecodePatch +import app.revanced.patcher.patch.creatingBytecodePatch import app.revanced.util.returnEarly -@Suppress("unused") -val enableUnlimitedSkipsPatch = bytecodePatch( - name = "Enable unlimited skips", +@Suppress("unused", "ObjectPropertyName") +val `Enable Unlimited Skips` by creatingBytecodePatch( + description = "Enable unlimited skips" ) { compatibleWith("com.pandora.android") apply { - skipLimitBehaviorFingerprint.method.returnEarly("unlimited") + skipLimitBehaviorMethod.returnEarly("unlimited") } } diff --git a/patches/src/main/kotlin/app/revanced/patches/pandora/misc/Fingerprints.kt b/patches/src/main/kotlin/app/revanced/patches/pandora/misc/Fingerprints.kt index 2a14e0ed1..06551370d 100644 --- a/patches/src/main/kotlin/app/revanced/patches/pandora/misc/Fingerprints.kt +++ b/patches/src/main/kotlin/app/revanced/patches/pandora/misc/Fingerprints.kt @@ -1,9 +1,11 @@ package app.revanced.patches.pandora.misc -import app.revanced.patcher.fingerprint +import app.revanced.patcher.BytecodePatchContextMethodMatching.gettingFirstMutableMethodDeclaratively +import app.revanced.patcher.definingClass +import app.revanced.patcher.name +import app.revanced.patcher.patch.BytecodePatchContext -internal val skipLimitBehaviorFingerprint = fingerprint { - custom { method, classDef -> - method.name == "getSkipLimitBehavior" && classDef.endsWith("UserData;") - } -} \ No newline at end of file +internal val BytecodePatchContext.skipLimitBehaviorMethod by gettingFirstMutableMethodDeclaratively { + name("getSkipLimitBehavior") + definingClass("UserData;"::endsWith) +}