Skip to content

Commit

Permalink
feat(YouTube - Theme): Disable gradient loading screen
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Oct 13, 2023
1 parent d97b390 commit fd09e46
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package app.revanced.integrations.patches.theme;

import app.revanced.integrations.settings.SettingsEnum;
import app.revanced.integrations.utils.ReVancedUtils;
import app.revanced.integrations.utils.ThemeHelper;

public class ThemeLithoComponentsPatch {
public class ThemePatch {
// color constants used in relation with litho components
private static final int[] WHITE_VALUES = {
-1, // comments chip background
Expand Down Expand Up @@ -40,6 +41,10 @@ public static int getValue(int originalValue) {
return originalValue;
}

public static boolean gradientLoadingScreenEnabled() {
return SettingsEnum.GRADIENT_LOADING_SCREEN.getBoolean();
}

private static int getBlackColor() {
if (blackColor == 0) blackColor = ReVancedUtils.getResourceColor("yt_black1");
return blackColor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public enum SettingsEnum {
USE_TABLET_MINIPLAYER("revanced_tablet_miniplayer", BOOLEAN, FALSE, true),
TABLET_LAYOUT("revanced_tablet_layout", BOOLEAN, FALSE, true, "revanced_tablet_layout_user_dialog_message"),
WIDE_SEARCHBAR("revanced_wide_searchbar", BOOLEAN, FALSE, true),
GRADIENT_LOADING_SCREEN("revanced_gradient_loading_screen", BOOLEAN, FALSE),
SEEKBAR_CUSTOM_COLOR("revanced_seekbar_custom_color", BOOLEAN, TRUE, true),
SEEKBAR_CUSTOM_COLOR_VALUE("revanced_seekbar_custom_color_value", STRING, "#FF0000", true, parents(SEEKBAR_CUSTOM_COLOR)),
HIDE_FILTER_BAR_FEED_IN_FEED("revanced_hide_filter_bar_feed_in_feed", BOOLEAN, FALSE, true),
Expand Down

0 comments on commit fd09e46

Please sign in to comment.