mirror of
https://github.com/revanced/revanced-patches
synced 2025-02-14 22:26:49 +01:00
fix(YouTube - Hide seekbar): Hide 19.34+ gradient seekbar
This commit is contained in:
parent
df8d07fa2e
commit
764c0504b4
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user