feat(youtube): hide-breaking-news-shelf patch (#258)

Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
0xrxL 2022-12-29 17:46:21 +01:00 committed by oSumAtrIX
parent 59031d95ea
commit eec90ee04c
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,14 @@
package app.revanced.integrations.patches;
import android.view.View;
import app.revanced.integrations.adremover.AdRemoverAPI;
import app.revanced.integrations.settings.SettingsEnum;
public class HideBreakingNewsPatch {
//Used by app.revanced.patches.youtube.layout.homepage.breakingnews.patch.BreakingNewsPatch
public static void hideBreakingNews(View view) {
if (!SettingsEnum.HIDE_BREAKING_NEWS.getBoolean()) return;
AdRemoverAPI.HideViewWithLayout1dp(view);
}
}

View File

@ -83,6 +83,7 @@ public enum SettingsEnum {
HIDE_SHORTS_COMMENTS_BUTTON("revanced_hide_shorts_comments_button", false, ReturnType.BOOLEAN),
HIDE_TIME_AND_SEEKBAR("revanced_hide_time_and_seekbar", false, ReturnType.BOOLEAN),
HIDE_WATCH_IN_VR("revanced_hide_watch_in_vr", false, ReturnType.BOOLEAN, true),
HIDE_BREAKING_NEWS("revanced_hide_breaking_news", true, ReturnType.BOOLEAN, true),
// Misc. Settings
FIX_PLAYBACK("revanced_fix_playback", false, ReturnType.BOOLEAN, false),