fix(youtube/hide-info-cards): remove initial popup of info-cards (#199)

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
OxrxL 2022-11-08 00:11:49 +01:00 committed by GitHub
parent f475c28f3d
commit 85971bcd5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 15 deletions

View File

@ -1,14 +0,0 @@
package app.revanced.integrations.patches;
import android.view.View;
import app.revanced.integrations.settings.SettingsEnum;
public class HideInfoCardSuggestionsPatch {
public static void hideInfoCardSuggestions(View view) {
if (!SettingsEnum.INFO_CARDS_SHOWN.getBoolean()) {
view.setVisibility(View.GONE);
}
}
}

View File

@ -0,0 +1,16 @@
package app.revanced.integrations.patches;
import android.view.View;
import app.revanced.integrations.settings.SettingsEnum;
public class HideInfocardsPatch {
public static void hideInfocardsIncognito(View view) {
if (!SettingsEnum.HIDE_INFO_CARDS.getBoolean()) return;
view.setVisibility(View.GONE);
}
public static boolean hideInfocardsMethodCall() {
return SettingsEnum.HIDE_INFO_CARDS.getBoolean();
}
}

View File

@ -56,7 +56,7 @@ public enum SettingsEnum {
// Layout settings // Layout settings
REEL_BUTTON_SHOWN("revanced_reel_button_enabled", false, ReturnType.BOOLEAN, true), REEL_BUTTON_SHOWN("revanced_reel_button_enabled", false, ReturnType.BOOLEAN, true),
INFO_CARDS_SHOWN("revanced_info_cards_enabled", false, ReturnType.BOOLEAN), HIDE_INFO_CARDS("revanced_hide_infocards", true, ReturnType.BOOLEAN),
BRANDING_SHOWN("revanced_branding_watermark_enabled", false, ReturnType.BOOLEAN), BRANDING_SHOWN("revanced_branding_watermark_enabled", false, ReturnType.BOOLEAN),
CAST_BUTTON_SHOWN("revanced_cast_button_enabled", false, ReturnType.BOOLEAN, true), CAST_BUTTON_SHOWN("revanced_cast_button_enabled", false, ReturnType.BOOLEAN, true),
AUTOPLAY_BUTTON_SHOWN("revanced_autoplay_button_enabled", false, ReturnType.BOOLEAN, true), AUTOPLAY_BUTTON_SHOWN("revanced_autoplay_button_enabled", false, ReturnType.BOOLEAN, true),