mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 13:17:46 +02:00
refactor: move the patch to the correct path
This commit is contained in:
@ -1,9 +1,11 @@
|
||||
package app.revanced.patches.youtube.swipe.swipecontrols.bytecode.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
|
||||
object SwipeControlsHostActivityFingerprint : MethodFingerprint(
|
||||
customFingerprint = { it, _ -> it.definingClass == "Lapp/revanced/integrations/swipecontrols/SwipeControlsHostActivity;"
|
||||
&& it.name == "<init>"
|
||||
}
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||
parameters = emptyList(),
|
||||
customFingerprint = { it, _ -> it.definingClass == "Lapp/revanced/integrations/swipecontrols/SwipeControlsHostActivity;" }
|
||||
)
|
||||
|
@ -1,10 +1,11 @@
|
||||
package app.revanced.patches.youtube.swipe.swipecontrols.bytecode.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
|
||||
object WatchWhileActivityFingerprint : MethodFingerprint(
|
||||
customFingerprint = { it, _ ->
|
||||
it.definingClass.endsWith("WatchWhileActivity;")
|
||||
&& it.name == "<init>"
|
||||
}
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||
parameters = emptyList(),
|
||||
customFingerprint = { it, _ -> it.definingClass.endsWith("WatchWhileActivity;") && it.name == "<init>" }
|
||||
)
|
||||
|
@ -12,7 +12,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.util.TypeUtil.traverseClassHierarchy
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
|
||||
import app.revanced.patches.youtube.utils.playertype.patch.PlayerTypeHookPatch
|
||||
import app.revanced.patches.youtube.swipe.swipecontrols.bytecode.fingerprints.SwipeControlsHostActivityFingerprint
|
||||
import app.revanced.patches.youtube.swipe.swipecontrols.bytecode.fingerprints.WatchWhileActivityFingerprint
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
@ -21,11 +21,7 @@ import org.jf.dexlib2.immutable.ImmutableMethod
|
||||
@Name("swipe-controls-bytecode-patch")
|
||||
@YouTubeCompatibility
|
||||
@Version("0.0.3")
|
||||
@DependsOn(
|
||||
[
|
||||
PlayerTypeHookPatch::class
|
||||
]
|
||||
)
|
||||
@DependsOn([PlayerTypeHookPatch::class])
|
||||
class SwipeControlsBytecodePatch : BytecodePatch(
|
||||
listOf(
|
||||
SwipeControlsHostActivityFingerprint,
|
||||
|
@ -10,9 +10,9 @@ import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.youtube.swipe.hdrbrightness.patch.HDRBrightnessPatch
|
||||
import app.revanced.patches.youtube.swipe.swipecontrols.bytecode.patch.SwipeControlsBytecodePatch
|
||||
import app.revanced.patches.youtube.swipe.swipecontrolshdr.patch.SwipeControlsHDRPatch
|
||||
import app.revanced.patches.youtube.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.resources.ResourceUtils
|
||||
import app.revanced.util.resources.ResourceUtils.copyResources
|
||||
|
||||
@ -21,9 +21,9 @@ import app.revanced.util.resources.ResourceUtils.copyResources
|
||||
@Description("Adds volume and brightness swipe controls.")
|
||||
@DependsOn(
|
||||
[
|
||||
HDRBrightnessPatch::class,
|
||||
SettingsPatch::class,
|
||||
SwipeControlsBytecodePatch::class,
|
||||
SwipeControlsHDRPatch::class
|
||||
SwipeControlsBytecodePatch::class
|
||||
]
|
||||
)
|
||||
@YouTubeCompatibility
|
||||
@ -31,7 +31,7 @@ import app.revanced.util.resources.ResourceUtils.copyResources
|
||||
class SwipeControlsPatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
|
||||
/*
|
||||
/**
|
||||
* Add settings
|
||||
*/
|
||||
SettingsPatch.addPreference(
|
||||
|
Reference in New Issue
Block a user