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

This commit is contained in:
LisoUseInAIKyrios 2024-10-20 09:56:00 -04:00
parent df8d07fa2e
commit 764c0504b4

View File

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