chore: lint code

This commit is contained in:
inotia00 2024-07-05 15:31:48 +09:00
parent 81ba1d3dbf
commit b3aa0161c2
4 changed files with 13 additions and 6 deletions

View File

@ -194,7 +194,8 @@ object MiniplayerPatch : BaseBytecodePatch(
// endregion
val miniplayerModernViewParentClassDef = MiniplayerModernViewParentFingerprint.resultOrThrow().classDef
val miniplayerModernViewParentClassDef =
MiniplayerModernViewParentFingerprint.resultOrThrow().classDef
// region Fix 19.16 using mixed up drawables for tablet modern.
// YT fixed this mistake in 19.17.
@ -266,11 +267,13 @@ object MiniplayerPatch : BaseBytecodePatch(
)
}.resultOrThrow().mutableMethod.apply {
addInstructionsWithLabels(
0, """
0,
"""
invoke-static { p1 }, $INTEGRATIONS_CLASS_DESCRIPTOR->hideMiniplayerSubTexts(Landroid/view/View;)Z
move-result v0
if-nez v0, :hidden
""", ExternalLabel("hidden", getInstruction(implementation!!.instructions.lastIndex))
""",
ExternalLabel("hidden", getInstruction(implementation!!.instructions.lastIndex))
)
}

View File

@ -94,7 +94,8 @@ object OverlayButtonsBytecodePatch : BytecodePatch(
val moveObjectIndex = indexOfFirstInstructionOrThrow {
(this as? TwoRegisterInstruction)?.registerB == registerResolver
}
val moveObjectRegister = getInstruction<TwoRegisterInstruction>(moveObjectIndex).registerA
val moveObjectRegister =
getInstruction<TwoRegisterInstruction>(moveObjectIndex).registerA
invokerObjectIndex = indexOfFirstInstructionOrThrow(moveObjectIndex) {
opcode == Opcode.IPUT_OBJECT
&& getReference<FieldReference>()?.definingClass == definingClass

View File

@ -5,7 +5,10 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.youtube.utils.fix.bottomui.fingerprints.*
import app.revanced.patches.youtube.utils.fix.bottomui.fingerprints.BottomUIContainerBooleanFingerprint
import app.revanced.patches.youtube.utils.fix.bottomui.fingerprints.BottomUIContainerIntegerFingerprint
import app.revanced.patches.youtube.utils.fix.bottomui.fingerprints.FullscreenButtonPositionFingerprint
import app.revanced.patches.youtube.utils.fix.bottomui.fingerprints.FullscreenButtonViewStubFingerprint
import app.revanced.util.getTargetIndexOrThrow
import app.revanced.util.getWideLiteralInstructionIndex
import com.android.tools.smali.dexlib2.Opcode