fix(youtube/hide-endscreen-cards): restore functionality (#200)

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
OxrxL 2022-11-08 18:07:30 +01:00 committed by GitHub
parent cc2bab4e39
commit d86655874b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,13 @@
package app.revanced.integrations.patches;
import android.view.View;
import app.revanced.integrations.settings.SettingsEnum;
public class HideEndscreenCardsPatch {
//Used by app.revanced.patches.youtube.layout.hideendscreencards.bytecode.patch.HideEndscreenCardsPatch
public static void hideEndscreen(View view) {
if (!SettingsEnum.HIDE_ENDSCREEN_CARDS.getBoolean()) return;
view.setVisibility(View.GONE);
}
}

View File

@ -58,6 +58,7 @@ public enum SettingsEnum {
REEL_BUTTON_SHOWN("revanced_reel_button_enabled", false, ReturnType.BOOLEAN, true), REEL_BUTTON_SHOWN("revanced_reel_button_enabled", false, ReturnType.BOOLEAN, true),
HIDE_INFO_CARDS("revanced_hide_infocards", true, 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),
HIDE_ENDSCREEN_CARDS("revanced_hide_endscreen_cards", true, 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),
USE_TABLET_MINIPLAYER("revanced_tablet_miniplayer", false, ReturnType.BOOLEAN, true), USE_TABLET_MINIPLAYER("revanced_tablet_miniplayer", false, ReturnType.BOOLEAN, true),