feat(YouTube - Theme): Disable gradient loading screen

This commit is contained in:
oSumAtrIX 2023-10-14 01:00:25 +02:00
parent d97b390866
commit fd09e46d01
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
2 changed files with 7 additions and 1 deletions

View File

@ -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
@ -40,6 +41,10 @@ public class ThemeLithoComponentsPatch {
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;

View File

@ -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),