Skip to content
This repository has been archived by the owner on Oct 26, 2024. It is now read-only.

fix(YouTube): Merge multiple layout patches into Hide Layout Components #721

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,51 @@ public static boolean showWatermark() {
return !Settings.HIDE_VIDEO_CHANNEL_WATERMARK.get();
}

/**
* Injection point.
*/
public static void hideAlbumCard(View view) {
Utils.hideViewBy0dpUnderCondition(Settings.HIDE_ALBUM_CARDS, view);
}

/**
* Injection point.
*/
public static void hideCrowdfundingBox(View view) {
Utils.hideViewBy0dpUnderCondition(Settings.HIDE_CROWDFUNDING_BOX, view);
}

/**
* Injection point.
*/
public static boolean hideFloatingMicrophoneButton(final boolean original) {
return original || Settings.HIDE_FLOATING_MICROPHONE_BUTTON.get();
}

/**
* Injection point.
*/
public static int hideInFeed(final int height) {
return Settings.HIDE_FILTER_BAR_FEED_IN_FEED.get()
? 0
: height;
}

/**
* Injection point.
*/
public static int hideInSearch(int height) {
return Settings.HIDE_FILTER_BAR_FEED_IN_SEARCH.get()
? 0
: height;
}

/**
* Injection point.
*/
public static void hideInRelatedVideos(View chipView) {
Utils.hideViewBy0dpUnderCondition(Settings.HIDE_FILTER_BAR_FEED_IN_RELATED_VIDEOS, chipView);
}

private static final boolean HIDE_DOODLES_ENABLED = Settings.HIDE_DOODLES.get();

Expand Down
Loading