mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-03 16:14:28 +02:00
fix(hook-timebar-patch): use upper case
This commit is contained in:
parent
904888cf75
commit
c2ddefe010
@ -1,40 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.misc.timebar.patch
|
|
||||||
|
|
||||||
import app.revanced.extensions.toErrorResult
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.PatchResult
|
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
|
||||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
|
||||||
import app.revanced.patches.youtube.misc.timebar.fingerprints.*
|
|
||||||
|
|
||||||
@Name("hook-timebar-patch")
|
|
||||||
@YouTubeCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
class HookTimebarPatch : BytecodePatch(
|
|
||||||
listOf(
|
|
||||||
EmptyColorFingerprint
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
|
||||||
|
|
||||||
EmptyColorFingerprint.result?.let { parentResult ->
|
|
||||||
emptyColorMethod = parentResult.mutableMethod
|
|
||||||
OnDrawFingerprint.also { it.resolve(context, parentResult.classDef) }.result?.mutableMethod?.let {
|
|
||||||
setTimebarMethod = it
|
|
||||||
} ?: return OnDrawFingerprint.toErrorResult()
|
|
||||||
} ?: return EmptyColorFingerprint.toErrorResult()
|
|
||||||
|
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
|
||||||
|
|
||||||
internal companion object {
|
|
||||||
lateinit var emptyColorMethod: MutableMethod
|
|
||||||
lateinit var setTimebarMethod: MutableMethod
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user