From f6ff69db9895f0b9a0f3edd770e7dc2e68af5683 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Fri, 18 Oct 2024 23:58:01 -0400 Subject: [PATCH] refactor --- .../youtube/patches/theme/SeekbarColorPatch.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/app/revanced/integrations/youtube/patches/theme/SeekbarColorPatch.java b/app/src/main/java/app/revanced/integrations/youtube/patches/theme/SeekbarColorPatch.java index 73150ef07e..66de313ab0 100644 --- a/app/src/main/java/app/revanced/integrations/youtube/patches/theme/SeekbarColorPatch.java +++ b/app/src/main/java/app/revanced/integrations/youtube/patches/theme/SeekbarColorPatch.java @@ -104,15 +104,17 @@ public static int getLithoColor(int colorValue) { */ public static void setLinearGradient(int[] colors, float[] positions) { if (SEEKBAR_CUSTOM_COLOR_ENABLED) { - Logger.printDebug(() -> "colors: " + Arrays.toString(colors) + " positions: " + Arrays.toString(positions)); - - // All usage of linear gradients is hooked, so must identify the values used for the seekbar. + // 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() ? 0x00000000 : seekbarColor); + return; } + + Logger.printDebug(() -> "colors: " + Arrays.toString(colors) + " positions: " + Arrays.toString(positions)); } }