File tree 1 file changed +19
-0
lines changed
src/main/kotlin/app/revanced/patches/youtube/layout/theme
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import app.revanced.patcher.patch.ResourcePatch
5
5
import app.revanced.patcher.patch.annotation.Patch
6
6
import app.revanced.patches.shared.drawable.DrawableColorPatch
7
7
import app.revanced.patches.youtube.utils.integrations.Constants.UTILS_PATH
8
+ import app.revanced.util.doRecursively
8
9
import org.w3c.dom.Element
9
10
10
11
@Patch(dependencies = [DrawableColorPatch ::class ])
@@ -87,6 +88,24 @@ object BaseThemePatch : ResourcePatch() {
87
88
}
88
89
}
89
90
91
+ /* *
92
+ * Since YouTube 19.20.35, the visibility of the background color of the `More comments` icon in live chat has worsened.
93
+ * See <a href="https://github.com/inotia00/ReVanced_Extended/issues/2197">ReVanced_Extended#2197</a>
94
+ *
95
+ * As a temporary workaround, revert to the colors of YouTube 19.19.39.
96
+ */
97
+ context.xmlEditor[" res/drawable/live_chat_more_comments_selector.xml" ].use { editor ->
98
+ editor.file.doRecursively loop@{ node ->
99
+ if (node !is Element ) return @loop
100
+
101
+ node.getAttributeNode(" android:color" )?.let { attribute ->
102
+ if (attribute.textContent == " ?ytInvertedBackground" ) {
103
+ attribute.textContent = " ?ytThemedBlue"
104
+ }
105
+ }
106
+ }
107
+ }
108
+
90
109
}
91
110
92
111
internal var isMonetPatchIncluded: Boolean = false
You can’t perform that action at this time.
0 commit comments