This repository was archived by the owner on Oct 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
app/src/main/java/app/revanced/integrations Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,30 +73,17 @@ public static void hideShortsButton(View view) {
7373 }
7474 }
7575
76- /**
77- * Removes the InfoCardSuggestions
78- *
79- * @param InfoCardOverlayPresenter
80- * @return
81- */
82- public static Object removeInfoCardSuggestions (Object InfoCardOverlayPresenter ) {
83- if (!SettingsEnum .INFO_CARDS_SHOWN_BOOLEAN .getBoolean ()) InfoCardOverlayPresenter = null ;
84- String message = InfoCardOverlayPresenter == null ? "RemoveInfoCardSuggestions: true" : "RemoveInfoCardSuggestions: false" ;
85- LogHelper .debug (AdRemoverAPI .class , message );
86- return InfoCardOverlayPresenter ;
87- }
88-
8976 /**
9077 * Removes the Suggestions
9178 *
92- * @param showSuggestions
9379 * @return
9480 */
95- public static Boolean removeSuggestions (Boolean showSuggestions ) {
96- if (!SettingsEnum .SUGGESTIONS_SHOWN_BOOLEAN .getBoolean ()) showSuggestions = false ;
97- String message = showSuggestions ? "RemoveSuggestions: true" : "RemoveSuggestions: false" ;
81+ public static void hideSuggestions (View view ) {
82+ String message = SettingsEnum .SUGGESTIONS_SHOWN_BOOLEAN .getBoolean () ? "Infocard suggestions: shown" : "Infocards: hidden" ;
9883 LogHelper .debug (AdRemoverAPI .class , message );
99- return showSuggestions ;
84+ if (!SettingsEnum .SUGGESTIONS_SHOWN_BOOLEAN .getBoolean ()) {
85+ view .setVisibility (View .GONE );
86+ }
10087 }
10188
10289 /*
Original file line number Diff line number Diff line change 44
55public class AutoRepeatPatch {
66
7- //ToDo: Write Patch for it.
8- //See https://drive.google.com/file/d/1hLl71Mm3oAtgTjNvsYZi3CUutCPx2gjS/view?usp=sharing for where it needs to be used.
7+
8+ //Used by app.revanced.patches.youtube.layout.autorepeat.patch.AutoRepeatPatch
99 public static boolean shouldAutoRepeat () {
1010 return SettingsEnum .PREFERRED_AUTO_REPEAT_BOOLEAN .getBoolean ();
1111 }
Original file line number Diff line number Diff line change 55
66public class HDRMaxBrightnessPatch {
77
8- //ToDo: Write Patch for it.
9- //See https://drive.google.com/file/d/1rIJzsaMQouH_2__EcVY5Dg6l7ji9vsyP/view?usp=sharing for where it needs to be used.
8+ //Used by app/revanced/patches/youtube/misc/hdrbrightness/patch/HDRBrightnessPatch
109 public static float getHDRBrightness (float original ) {
1110 if (!SettingsEnum .USE_HDR_BRIGHTNESS_BOOLEAN .getBoolean ()) return original ;
1211 return SettingsEnum .ENABLE_SWIPE_BRIGHTNESS_BOOLEAN .getBoolean () ? BrightnessHelper .getBrightness () : -1.0f ;
Original file line number Diff line number Diff line change 11package app .revanced .integrations .patches ;
22
3- import app .revanced .integrations .adremover . AdRemoverAPI ;
3+ import app .revanced .integrations .settings . SettingsEnum ;
44
55public class HideInfoCardSuggestionsPatch {
66
7- //TODO: Create Patch
8- //Not used yet
9- public static void HideInfoCardSuggestions (Object InfoCardOverlayPresenter ) {
10- AdRemoverAPI .removeInfoCardSuggestions (InfoCardOverlayPresenter );
7+ public static int hideInfoCardSuggestions () {
8+ return SettingsEnum .INFO_CARDS_SHOWN_BOOLEAN .getBoolean () ? 0 : 8 ;
119 }
1210}
Original file line number Diff line number Diff line change 11package app .revanced .integrations .patches ;
22
3+ import android .view .View ;
4+
35import app .revanced .integrations .adremover .AdRemoverAPI ;
46
57public class HideSuggestionsPatch {
68
7- //TODO: Create Patch
8- //Not used yet
9- public static void HideSuggestions (boolean showSuggestions ) {
10- AdRemoverAPI .removeSuggestions (showSuggestions );
9+ public static void hideSuggestions (View view ) {
10+ AdRemoverAPI .hideSuggestions (view );
1111 }
1212
1313}
You can’t perform that action at this time.
0 commit comments