mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-11-27 06:16:49 +01:00
fix(YouTube - Hide seekbar): Hide 19.34+ gradient seekbar
This commit is contained in:
parent
53d5a94bfa
commit
e3975cfc3a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user