mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 05:07:41 +02:00
feat(music/amoled): patch now applies the amoled theme to the comment input box as well
This commit is contained in:
@ -4,17 +4,23 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.shared.patch.litho.LithoThemePatch
|
||||
import app.revanced.util.integrations.Constants.MUSIC_UTILS_PATH
|
||||
import org.w3c.dom.Element
|
||||
|
||||
@Patch
|
||||
@Name("Amoled")
|
||||
@Description("Applies pure black theme in flyout panels.")
|
||||
@Description("Applies pure black theme on some components.")
|
||||
@DependsOn([LithoThemePatch::class])
|
||||
@MusicCompatibility
|
||||
class AmoledPatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext) {
|
||||
|
||||
LithoThemePatch.injectCall("$MUSIC_UTILS_PATH/LithoThemePatch;->applyLithoTheme(I)I")
|
||||
|
||||
context.xmlEditor["res/values/colors.xml"].use { editor ->
|
||||
val resourcesNode = editor.file.getElementsByTagName("resources").item(0) as Element
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.youtube.utils.litho.fingerprints
|
||||
package app.revanced.patches.shared.fingerprints.litho
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
@ -1,19 +1,17 @@
|
||||
package app.revanced.patches.youtube.utils.litho.patch
|
||||
package app.revanced.patches.shared.patch.litho
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.youtube.utils.litho.fingerprints.LithoThemeFingerprint
|
||||
import app.revanced.patches.shared.fingerprints.litho.LithoThemeFingerprint
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
|
||||
class LithoThemePatch : BytecodePatch(
|
||||
listOf(
|
||||
LithoThemeFingerprint
|
||||
)
|
||||
listOf(LithoThemeFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.youtube.layout.theme.patch
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.youtube.utils.litho.patch.LithoThemePatch
|
||||
import app.revanced.patches.shared.patch.litho.LithoThemePatch
|
||||
import app.revanced.util.integrations.Constants.UTILS_PATH
|
||||
import org.w3c.dom.Element
|
||||
|
||||
|
@ -11,11 +11,11 @@ import app.revanced.patcher.patch.PatchException
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.shared.patch.litho.LithoThemePatch
|
||||
import app.revanced.patches.youtube.seekbar.seekbarcolor.fingerprints.ControlsOverlayStyleFingerprint
|
||||
import app.revanced.patches.youtube.seekbar.seekbarcolor.fingerprints.PlayerSeekbarColorFingerprint
|
||||
import app.revanced.patches.youtube.seekbar.seekbarcolor.fingerprints.ShortsSeekbarColorFingerprint
|
||||
import app.revanced.patches.youtube.utils.annotations.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.utils.litho.patch.LithoThemePatch
|
||||
import app.revanced.patches.youtube.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.youtube.utils.resourceid.patch.SharedResourceIdPatch.Companion.InlineTimeBarColorizedBarPlayedColorDark
|
||||
import app.revanced.patches.youtube.utils.resourceid.patch.SharedResourceIdPatch.Companion.InlineTimeBarPlayedNotHighlightedColor
|
||||
|
Reference in New Issue
Block a user