mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-05 00:54:32 +02:00
chore: lint code
This commit is contained in:
parent
d5bc7d6588
commit
0a33f8f2ef
@ -30,6 +30,7 @@ object SettingsBytecodePatch : BytecodePatch(
|
||||
"$MUSIC_INTEGRATIONS_PATH/settingsmenu/ReVancedSettingActivity;"
|
||||
private const val INTEGRATIONS_FRAGMENT_CLASS_DESCRIPTOR =
|
||||
"$MUSIC_INTEGRATIONS_PATH/settingsmenu/ReVancedSettingsFragment;"
|
||||
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
/**
|
||||
|
@ -52,6 +52,7 @@ object HidePreviousNextButtonPatch : BytecodePatch(
|
||||
|
||||
private const val INTEGRATIONS_METHOD_REFERENCE =
|
||||
"$PLAYER->hidePreviousNextButton(Z)Z"
|
||||
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
PlayerControlsVisibilityModelFingerprint.result?.let {
|
||||
|
@ -17,9 +17,7 @@ import app.revanced.patches.youtube.utils.navbarindex.fingerprints.OnResumeFragm
|
||||
import app.revanced.patches.youtube.utils.navbarindex.fingerprints.SettingsActivityOnBackPressedFingerprint
|
||||
import app.revanced.util.integrations.Constants.UTILS_PATH
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction35c
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.reference.Reference
|
||||
|
||||
@ -41,12 +39,14 @@ object NavBarIndexHookPatch : BytecodePatch(
|
||||
DefaultTabsBarFingerprint.result?.let {
|
||||
it.mutableMethod.apply {
|
||||
val targetIndex = it.scanResult.patternScanResult!!.startIndex
|
||||
val setTabIndexReference = getInstruction<ReferenceInstruction>(targetIndex).reference
|
||||
val setTabIndexReference =
|
||||
getInstruction<ReferenceInstruction>(targetIndex).reference
|
||||
|
||||
val (onClickMethod, insertIndex) = getOnClickMethod(context, setTabIndexReference)
|
||||
|
||||
onClickMethod.apply {
|
||||
val indexRegister = getInstruction<FiveRegisterInstruction>(insertIndex).registerD
|
||||
val indexRegister =
|
||||
getInstruction<FiveRegisterInstruction>(insertIndex).registerD
|
||||
|
||||
addInstruction(
|
||||
insertIndex,
|
||||
|
@ -9,6 +9,7 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchException
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.youtube.utils.fingerprints.PlayerControlsVisibilityModelFingerprint
|
||||
import app.revanced.patches.youtube.utils.fingerprints.ThumbnailPreviewConfigFingerprint
|
||||
import app.revanced.patches.youtube.utils.fingerprints.YouTubeControlsOverlayFingerprint
|
||||
import app.revanced.patches.youtube.utils.playercontrols.fingerprints.BottomControlsInflateFingerprint
|
||||
@ -16,7 +17,6 @@ import app.revanced.patches.youtube.utils.playercontrols.fingerprints.ControlsLa
|
||||
import app.revanced.patches.youtube.utils.playercontrols.fingerprints.FullscreenEngagementSpeedEduVisibleFingerprint
|
||||
import app.revanced.patches.youtube.utils.playercontrols.fingerprints.FullscreenEngagementSpeedEduVisibleParentFingerprint
|
||||
import app.revanced.patches.youtube.utils.playercontrols.fingerprints.PlayerControlsVisibilityFingerprint
|
||||
import app.revanced.patches.youtube.utils.fingerprints.PlayerControlsVisibilityModelFingerprint
|
||||
import app.revanced.patches.youtube.utils.playercontrols.fingerprints.QuickSeekVisibleFingerprint
|
||||
import app.revanced.patches.youtube.utils.playercontrols.fingerprints.SeekEDUVisibleFingerprint
|
||||
import app.revanced.patches.youtube.utils.playercontrols.fingerprints.UserScrubbingFingerprint
|
||||
|
@ -22,7 +22,6 @@ import app.revanced.patches.youtube.utils.sponsorblock.fingerprints.RectangleFie
|
||||
import app.revanced.patches.youtube.utils.sponsorblock.fingerprints.SegmentPlaybackControllerFingerprint
|
||||
import app.revanced.patches.youtube.utils.videoid.general.VideoIdPatch
|
||||
import app.revanced.patches.youtube.utils.videoid.withoutshorts.VideoIdWithoutShortsPatch
|
||||
import app.revanced.util.bytecode.BytecodeHelper.injectInit
|
||||
import app.revanced.util.bytecode.getWideLiteralIndex
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.builder.BuilderInstruction
|
||||
@ -216,9 +215,6 @@ object SponsorBlockBytecodePatch : BytecodePatch(
|
||||
* Inject VideoIdPatch
|
||||
*/
|
||||
VideoIdWithoutShortsPatch.injectCall("$INTEGRATIONS_PLAYER_CONTROLLER_CLASS_DESCRIPTOR->setCurrentVideoId(Ljava/lang/String;)V")
|
||||
|
||||
context.injectInit("InitializationPatch", "initializeSponsorBlockSettings", true)
|
||||
|
||||
}
|
||||
|
||||
private const val INTEGRATIONS_BUTTON_CLASS_DESCRIPTOR =
|
||||
|
Loading…
x
Reference in New Issue
Block a user