Skip to content
This repository has been archived by the owner on Oct 26, 2024. It is now read-only.

Commit

Permalink
fix(YouTube - Hide seekbar): Hide 19.34+ gradient seekbar
Browse files Browse the repository at this point in the history
  • Loading branch information
LisoUseInAIKyrios committed Oct 20, 2024
1 parent 53d5a94 commit e3975cf
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,14 @@ public static int getLithoColor(int colorValue) {
* 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;
Expand Down

0 comments on commit e3975cf

Please sign in to comment.