Compare commits

...

5 Commits

Author SHA1 Message Date
semantic-release-bot
2757572442 chore(release): 2.200.0-dev.2 [skip ci]
# [2.200.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.200.0-dev.1...v2.200.0-dev.2) (2023-11-21)

### Bug Fixes

* **Spotify - Custom theme:** Add more background surfaces coloring options ([#3285](https://github.com/ReVanced/revanced-patches/issues/3285)) ([521d3a0](521d3a08c8))
2023-11-21 20:16:11 +00:00
Advyte
521d3a08c8 fix(Spotify - Custom theme): Add more background surfaces coloring options (#3285)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-11-21 21:13:58 +01:00
semantic-release-bot
5282ccf4f3 chore(release): 2.200.0-dev.1 [skip ci]
# [2.200.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.199.0...v2.200.0-dev.1) (2023-11-21)

### Features

* **Twitch:** Constrain patches to versions known to work ([54b23da](54b23da0b4))
* **Twitch:** Support version `16.9.1` ([e74f7d9](e74f7d96d7))
2023-11-21 20:08:05 +00:00
oSumAtrIX
e74f7d96d7 feat(Twitch): Support version 16.9.1 2023-11-21 21:05:23 +01:00
oSumAtrIX
54b23da0b4 feat(Twitch): Constrain patches to versions known to work 2023-11-21 21:05:22 +01:00
9 changed files with 55 additions and 17 deletions

View File

@@ -1,3 +1,18 @@
# [2.200.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.200.0-dev.1...v2.200.0-dev.2) (2023-11-21)
### Bug Fixes
* **Spotify - Custom theme:** Add more background surfaces coloring options ([#3285](https://github.com/ReVanced/revanced-patches/issues/3285)) ([869ec26](https://github.com/ReVanced/revanced-patches/commit/869ec26966f7750c45355ac0acc18b81a2abce87))
# [2.200.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.199.0...v2.200.0-dev.1) (2023-11-21)
### Features
* **Twitch:** Constrain patches to versions known to work ([65b55a5](https://github.com/ReVanced/revanced-patches/commit/65b55a5189df52dc7e99b7e9c68b908fbca92434))
* **Twitch:** Support version `16.9.1` ([c70e4a6](https://github.com/ReVanced/revanced-patches/commit/c70e4a66bd65b42db88dcabd412ec985226bd1e7))
# [2.199.0](https://github.com/ReVanced/revanced-patches/compare/v2.198.0...v2.199.0) (2023-11-20) # [2.199.0](https://github.com/ReVanced/revanced-patches/compare/v2.198.0...v2.199.0) (2023-11-20)

View File

@@ -1,4 +1,4 @@
org.gradle.parallel = true org.gradle.parallel = true
org.gradle.caching = true org.gradle.caching = true
kotlin.code.style = official kotlin.code.style = official
version = 2.199.0 version = 2.200.0-dev.2

File diff suppressed because one or more lines are too long

View File

@@ -17,25 +17,42 @@ object CustomThemePatch : ResourcePatch() {
private var backgroundColor by stringPatchOption( private var backgroundColor by stringPatchOption(
key = "backgroundColor", key = "backgroundColor",
default = "@android:color/black", default = "@android:color/black",
title = "Background color", title = "Primary background color",
description = "The background color. Can be a hex color or a resource reference.", description = "The background color. Can be a hex color or a resource reference.",
required = true
)
private var backgroundColorSecondary by stringPatchOption(
key = "backgroundColorSecondary",
default = "#ff282828",
title = "Secondary background color",
description = "The secondary background color. Can be a hex color or a resource reference.",
required = true
) )
private var accentColor by stringPatchOption( private var accentColor by stringPatchOption(
key = "accentColor", key = "accentColor",
default = "#ff1ed760", default = "#ff1ed760",
title = "Accent color", title = "Accent color",
description = "The accent color ('spotify green' by default). Can be a hex color or a resource reference.", description = "The accent color ('Spotify green' by default). Can be a hex color or a resource reference.",
required = true
) )
private var accentPressedColor by stringPatchOption( private var accentColorPressed by stringPatchOption(
key = "accentPressedColor", key = "accentColorPressed",
default = "#ff169c46", default = "#ff169c46",
title = "Pressed accent for the dark theme", title = "Pressed dark theme accent color",
description = "The color when accented buttons are pressed, by default slightly darker than accent. Can be a hex color or a resource reference." description = "The color when accented buttons are pressed, by default slightly darker than accent. "
+ "Can be a hex color or a resource reference.",
required = true
) )
override fun execute(context: ResourceContext) { override fun execute(context: ResourceContext) {
val backgroundColor = backgroundColor!!
val backgroundColorSecondary = backgroundColorSecondary!!
val accentColor = accentColor!!
val accentColorPressed = accentColorPressed!!
context.xmlEditor["res/values/colors.xml"].use { editor -> context.xmlEditor["res/values/colors.xml"].use { editor ->
val resourcesNode = editor.file.getElementsByTagName("resources").item(0) as Element val resourcesNode = editor.file.getElementsByTagName("resources").item(0) as Element
@@ -43,12 +60,18 @@ object CustomThemePatch : ResourcePatch() {
val node = resourcesNode.childNodes.item(i) as? Element ?: continue val node = resourcesNode.childNodes.item(i) as? Element ?: continue
node.textContent = when (node.getAttribute("name")) { node.textContent = when (node.getAttribute("name")) {
"gray_7" -> backgroundColor!! "dark_base_background_elevated_base", "design_dark_default_color_background",
"dark_brightaccent_background_base", "dark_base_text_brightaccent", "green_light" -> accentColor!! "design_dark_default_color_surface", "gray_7", "gray_background", "gray_layer",
"dark_brightaccent_background_press" -> accentPressedColor!! "sthlm_blk" -> backgroundColor
"gray_15" -> backgroundColorSecondary
"dark_brightaccent_background_base", "dark_base_text_brightaccent", "green_light" -> accentColor
"dark_brightaccent_background_press" -> accentColorPressed
else -> continue else -> continue
} }
} }
} }
} }
} }

View File

@@ -17,7 +17,7 @@ import app.revanced.patches.twitch.misc.settings.SettingsPatch
name = "Block audio ads", name = "Block audio ads",
description = "Blocks audio ads in streams and VODs.", description = "Blocks audio ads in streams and VODs.",
dependencies = [IntegrationsPatch::class, SettingsPatch::class], dependencies = [IntegrationsPatch::class, SettingsPatch::class],
compatiblePackages = [CompatiblePackage("tv.twitch.android.app", ["15.4.1", "16.1.0", "17.0.0", "17.1.0"])], compatiblePackages = [CompatiblePackage("tv.twitch.android.app", ["15.4.1", "16.1.0", "16.9.1"])],
) )
@Suppress("unused") @Suppress("unused")
object AudioAdsPatch : BytecodePatch( object AudioAdsPatch : BytecodePatch(

View File

@@ -18,7 +18,7 @@ import app.revanced.patches.twitch.misc.settings.SettingsPatch
name = "Block embedded ads", name = "Block embedded ads",
description = "Blocks embedded stream ads using services like Luminous or PurpleAdBlocker.", description = "Blocks embedded stream ads using services like Luminous or PurpleAdBlocker.",
dependencies = [VideoAdsPatch::class, IntegrationsPatch::class, SettingsPatch::class], dependencies = [VideoAdsPatch::class, IntegrationsPatch::class, SettingsPatch::class],
compatiblePackages = [CompatiblePackage("tv.twitch.android.app", ["15.4.1", "16.1.0", "17.0.0", "17.1.0"])] compatiblePackages = [CompatiblePackage("tv.twitch.android.app", ["15.4.1", "16.1.0", "16.9.1"])]
) )
@Suppress("unused") @Suppress("unused")
object EmbeddedAdsPatch : BytecodePatch( object EmbeddedAdsPatch : BytecodePatch(

View File

@@ -21,7 +21,7 @@ import app.revanced.patches.twitch.misc.settings.SettingsPatch
name = "Block video ads", name = "Block video ads",
description = "Blocks video ads in streams and VODs.", description = "Blocks video ads in streams and VODs.",
dependencies = [IntegrationsPatch::class, SettingsPatch::class], dependencies = [IntegrationsPatch::class, SettingsPatch::class],
compatiblePackages = [CompatiblePackage("tv.twitch.android.app", ["15.4.1", "16.1.0", "17.0.0", "17.1.0"])] compatiblePackages = [CompatiblePackage("tv.twitch.android.app", ["15.4.1", "16.1.0", "16.9.1"])]
) )
object VideoAdsPatch : AbstractAdPatch( object VideoAdsPatch : AbstractAdPatch(
"Lapp/revanced/twitch/patches/VideoAdsPatch;->shouldBlockVideoAds()Z", "Lapp/revanced/twitch/patches/VideoAdsPatch;->shouldBlockVideoAds()Z",

View File

@@ -22,7 +22,7 @@ import app.revanced.patches.twitch.misc.settings.SettingsPatch
name = "Show deleted messages", name = "Show deleted messages",
description = "Shows deleted chat messages behind a clickable spoiler.", description = "Shows deleted chat messages behind a clickable spoiler.",
dependencies = [IntegrationsPatch::class, SettingsPatch::class], dependencies = [IntegrationsPatch::class, SettingsPatch::class],
compatiblePackages = [CompatiblePackage("tv.twitch.android.app", ["15.4.1", "16.1.0", "17.0.0", "17.1.0"])] compatiblePackages = [CompatiblePackage("tv.twitch.android.app", ["15.4.1", "16.1.0", "16.9.1"])]
) )
@Suppress("unused") @Suppress("unused")
object ShowDeletedMessagesPatch : BytecodePatch( object ShowDeletedMessagesPatch : BytecodePatch(

View File

@@ -17,7 +17,7 @@ import app.revanced.patches.twitch.misc.settings.SettingsPatch
name = "Auto claim channel points", name = "Auto claim channel points",
description = "Automatically claim Channel Points.", description = "Automatically claim Channel Points.",
dependencies = [SettingsPatch::class], dependencies = [SettingsPatch::class],
compatiblePackages = [CompatiblePackage("tv.twitch.android.app", ["15.4.1", "16.1.0", "17.0.0", "17.1.0"])] compatiblePackages = [CompatiblePackage("tv.twitch.android.app", ["15.4.1", "16.1.0", "16.9.1"])]
) )
@Suppress("unused") @Suppress("unused")
object AutoClaimChannelPointPatch : BytecodePatch( object AutoClaimChannelPointPatch : BytecodePatch(