Skip to content

Commit

Permalink
fix(YouTube/Theme): reverts background color of More comments icon …
Browse files Browse the repository at this point in the history
  • Loading branch information
inotia00 committed Jun 27, 2024
1 parent 53df153 commit bb916a7
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.shared.drawable.DrawableColorPatch
import app.revanced.patches.youtube.utils.integrations.Constants.UTILS_PATH
import app.revanced.util.doRecursively
import org.w3c.dom.Element

@Patch(dependencies = [DrawableColorPatch::class])
Expand Down Expand Up @@ -87,6 +88,24 @@ object BaseThemePatch : ResourcePatch() {
}
}

/**
* Since YouTube 19.20.35, the visibility of the background color of the `More comments` icon in live chat has worsened.
* See <a href="https://github.com/inotia00/ReVanced_Extended/issues/2197">ReVanced_Extended#2197</a>
*
* As a temporary workaround, revert to the colors of YouTube 19.19.39.
*/
context.xmlEditor["res/drawable/live_chat_more_comments_selector.xml"].use { editor ->
editor.file.doRecursively loop@{ node ->
if (node !is Element) return@loop

node.getAttributeNode("android:color")?.let { attribute ->
if (attribute.textContent == "?ytInvertedBackground") {
attribute.textContent = "?ytThemedBlue"
}
}
}
}

}

internal var isMonetPatchIncluded: Boolean = false
Expand Down

0 comments on commit bb916a7

Please sign in to comment.