From 764c0504b487aba696b963b4653fe377e334ab2c Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Sun, 20 Oct 2024 09:56:00 -0400 Subject: [PATCH] fix(YouTube - Hide seekbar): Hide 19.34+ gradient seekbar --- .../youtube/patches/theme/SeekbarColorPatch.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/integrations/java/app/revanced/integrations/youtube/patches/theme/SeekbarColorPatch.java b/integrations/java/app/revanced/integrations/youtube/patches/theme/SeekbarColorPatch.java index 2e97a27d8..261af188e 100644 --- a/integrations/java/app/revanced/integrations/youtube/patches/theme/SeekbarColorPatch.java +++ b/integrations/java/app/revanced/integrations/youtube/patches/theme/SeekbarColorPatch.java @@ -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;