diff --git a/src/main/kotlin/app/revanced/patches/music/general/castbutton/patch/HideCastButtonPatch.kt b/src/main/kotlin/app/revanced/patches/music/general/castbutton/patch/HideCastButtonPatch.kt index 75e410e2e..667d3c930 100644 --- a/src/main/kotlin/app/revanced/patches/music/general/castbutton/patch/HideCastButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/general/castbutton/patch/HideCastButtonPatch.kt @@ -44,7 +44,8 @@ class HideCastButtonPatch : BytecodePatch( * Hide cast button */ MediaRouteButtonFingerprint.result?.let { - val setVisibilityMethod = it.mutableClass.methods.find { method -> method.name == "setVisibility" } + val setVisibilityMethod = + it.mutableClass.methods.find { method -> method.name == "setVisibility" } setVisibilityMethod?.apply { addInstructions( diff --git a/src/main/kotlin/app/revanced/patches/music/utils/overridequality/patch/OverrideQualityHookPatch.kt b/src/main/kotlin/app/revanced/patches/music/utils/overridequality/patch/OverrideQualityHookPatch.kt index 76c5e9fb1..85efb788f 100644 --- a/src/main/kotlin/app/revanced/patches/music/utils/overridequality/patch/OverrideQualityHookPatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/utils/overridequality/patch/OverrideQualityHookPatch.kt @@ -29,12 +29,14 @@ class OverrideQualityHookPatch : BytecodePatch( override fun execute(context: BytecodeContext) { VideoQualityListFingerprint.result?.let { - val constructorMethod = it.mutableClass.methods.first { method -> MethodUtil.isConstructor(method) } - val overrideMethod = it.mutableClass.methods.find { method -> method.parameterTypes.first() == "I" } + val constructorMethod = + it.mutableClass.methods.first { method -> MethodUtil.isConstructor(method) } + val overrideMethod = + it.mutableClass.methods.find { method -> method.parameterTypes.first() == "I" } QUALITY_CLASS = it.method.definingClass QUALITY_METHOD = overrideMethod?.name - ?:throw PatchException("Failed to find hook method") + ?: throw PatchException("Failed to find hook method") constructorMethod.apply { addInstruction( diff --git a/src/main/kotlin/app/revanced/patches/music/utils/settings/bytecode/fingerprints/SettingsHeadersFragmentFingerprint.kt b/src/main/kotlin/app/revanced/patches/music/utils/settings/bytecode/fingerprints/SettingsHeadersFragmentFingerprint.kt index 95bc31b72..97d6e6228 100644 --- a/src/main/kotlin/app/revanced/patches/music/utils/settings/bytecode/fingerprints/SettingsHeadersFragmentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/music/utils/settings/bytecode/fingerprints/SettingsHeadersFragmentFingerprint.kt @@ -10,7 +10,6 @@ object SettingsHeadersFragmentFingerprint : MethodFingerprint( Opcode.IGET_OBJECT, Opcode.INVOKE_VIRTUAL, Opcode.MOVE_RESULT_OBJECT - ), customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("/SettingsHeadersFragment;") && methodDef.name == "onCreate" } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/seekbar/append/patch/AppendTimeStampInformationPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/seekbar/append/patch/AppendTimeStampInformationPatch.kt index e1a0811f4..0a6d3cdac 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/seekbar/append/patch/AppendTimeStampInformationPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/seekbar/append/patch/AppendTimeStampInformationPatch.kt @@ -50,7 +50,8 @@ class AppendTimeStampInformationPatch : BytecodePatch( ) { setTextIndex = textViewIndex + 2 val setTextRegister = getInstruction(setTextIndex).registerC - val textViewRegister = getInstruction(textViewIndex).registerC + val textViewRegister = + getInstruction(textViewIndex).registerC addInstructions( setTextIndex, """ diff --git a/src/main/kotlin/app/revanced/patches/youtube/utils/overridequality/patch/OverrideQualityHookPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/utils/overridequality/patch/OverrideQualityHookPatch.kt index 5409901eb..b64f17ad2 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/utils/overridequality/patch/OverrideQualityHookPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/utils/overridequality/patch/OverrideQualityHookPatch.kt @@ -33,12 +33,14 @@ class OverrideQualityHookPatch : BytecodePatch( override fun execute(context: BytecodeContext) { VideoQualityListFingerprint.result?.let { - val constructorMethod = it.mutableClass.methods.first { method -> MethodUtil.isConstructor(method) } - val overrideMethod = it.mutableClass.methods.find { method -> method.parameterTypes.first() == "I" } + val constructorMethod = + it.mutableClass.methods.first { method -> MethodUtil.isConstructor(method) } + val overrideMethod = + it.mutableClass.methods.find { method -> method.parameterTypes.first() == "I" } QUALITY_CLASS = it.method.definingClass QUALITY_METHOD = overrideMethod?.name - ?:throw PatchException("Failed to find hook method") + ?: throw PatchException("Failed to find hook method") constructorMethod.apply { addInstruction( diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/quality/patch/VideoQualityPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/quality/patch/VideoQualityPatch.kt index 63bcdf768..2232a464a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/quality/patch/VideoQualityPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/quality/patch/VideoQualityPatch.kt @@ -64,7 +64,8 @@ class VideoQualityPatch : BytecodePatch( } ?: throw NewFlyoutPanelOnClickListenerFingerprint.exception VideoQualitySetterFingerprint.result?.let { - val onItemClickMethod = it.mutableClass.methods.find { method -> method.name == "onItemClick" } + val onItemClickMethod = + it.mutableClass.methods.find { method -> method.name == "onItemClick" } onItemClickMethod?.apply { val listItemIndexParameter = 3