fix(YouTube - Hide seekbar): Hide 19.34+ gradient seekbar

This commit is contained in:
LisoUseInAIKyrios 2024-10-20 09:56:00 -04:00
parent 53d5a94bfa
commit e3975cfc3a

View File

@ -104,12 +104,14 @@ public final class SeekbarColorPatch {
* Injection point.
*/
public static void setLinearGradient(int[] colors, float[] positions) {
if (SEEKBAR_CUSTOM_COLOR_ENABLED) {
final boolean hideSeekbar = Settings.HIDE_SEEKBAR_THUMBNAIL.get();
if (SEEKBAR_CUSTOM_COLOR_ENABLED || hideSeekbar) {
// Most litho usage of linear gradients is hooked here,
// so must only change if the values are those for the seekbar.
if (Arrays.equals(ORIGINAL_SEEKBAR_GRADIENT_COLORS, colors)
&& Arrays.equals(ORIGINAL_SEEKBAR_GRADIENT_POSITIONS, positions)) {
Arrays.fill(colors, Settings.HIDE_SEEKBAR_THUMBNAIL.get()
Arrays.fill(colors, hideSeekbar
? 0x00000000
: seekbarColor);
return;