feat(YouTube): separate the Bypass image region restrictions patch from the Alternative thumbnails patch (Reflecting changes in ReVanced)

This commit is contained in:
inotia00
2024-07-17 15:53:21 +09:00
parent 0309d371f7
commit d10869a129
21 changed files with 283 additions and 249 deletions

View File

@ -42,6 +42,9 @@ fun MethodFingerprint.resultOrThrow() = result ?: throw exception
val MethodFingerprint.exception
get() = PatchException("Failed to resolve ${this.javaClass.simpleName}")
fun MethodFingerprint.alsoResolve(context: BytecodeContext, fingerprint: MethodFingerprint) =
also { resolve(context, fingerprint.resultOrThrow().classDef) }.resultOrThrow()
/**
* Find the [MutableMethod] from a given [Method] in a [MutableClass].
*