mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-05-04 16:44:24 +02:00
feat(youtube): add hide-filter-bar
patch
This commit is contained in:
parent
701f88460d
commit
9649c3dbc8
@ -0,0 +1,25 @@
|
|||||||
|
package app.revanced.integrations.patches;
|
||||||
|
|
||||||
|
import android.view.View;
|
||||||
|
import app.revanced.integrations.adremover.AdRemoverAPI;
|
||||||
|
import app.revanced.integrations.settings.SettingsEnum;
|
||||||
|
|
||||||
|
public final class HideFilterBarPatch {
|
||||||
|
public static int hideInFeed(final int height) {
|
||||||
|
if (SettingsEnum.HIDE_FILTER_BAR_FEED_IN_FEED.getBoolean()) return 0;
|
||||||
|
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void hideInRelatedVideos(final View chipView) {
|
||||||
|
if (!SettingsEnum.HIDE_FILTER_BAR_FEED_IN_RELATED_VIDEOS.getBoolean()) return;
|
||||||
|
|
||||||
|
AdRemoverAPI.HideViewWithLayout1dp(chipView);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int hideInSearch(final int height) {
|
||||||
|
if (SettingsEnum.HIDE_FILTER_BAR_FEED_IN_SEARCH.getBoolean()) return 0;
|
||||||
|
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
}
|
@ -110,6 +110,9 @@ public enum SettingsEnum {
|
|||||||
USE_TABLET_MINIPLAYER("revanced_tablet_miniplayer", BOOLEAN, FALSE, true),
|
USE_TABLET_MINIPLAYER("revanced_tablet_miniplayer", BOOLEAN, FALSE, true),
|
||||||
WIDE_SEARCHBAR("revanced_wide_searchbar", BOOLEAN, FALSE, true),
|
WIDE_SEARCHBAR("revanced_wide_searchbar", BOOLEAN, FALSE, true),
|
||||||
SEEKBAR_COLOR("revanced_seekbar_color", STRING, "#FF0000", true),
|
SEEKBAR_COLOR("revanced_seekbar_color", STRING, "#FF0000", true),
|
||||||
|
HIDE_FILTER_BAR_FEED_IN_FEED("revanced_hide_filter_bar_feed_in_feed", BOOLEAN, FALSE, true),
|
||||||
|
HIDE_FILTER_BAR_FEED_IN_SEARCH("revanced_hide_filter_bar_feed_in_search", BOOLEAN, FALSE, true),
|
||||||
|
HIDE_FILTER_BAR_FEED_IN_RELATED_VIDEOS("revanced_hide_filter_bar_feed_in_related_videos", BOOLEAN, FALSE, true),
|
||||||
|
|
||||||
// Misc. Settings
|
// Misc. Settings
|
||||||
SIGNATURE_SPOOFING("revanced_spoof_signature_verification", BOOLEAN, TRUE, "revanced_spoof_signature_verification_user_dialog_message"),
|
SIGNATURE_SPOOFING("revanced_spoof_signature_verification", BOOLEAN, TRUE, "revanced_spoof_signature_verification_user_dialog_message"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user