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

Commit

Permalink
feat(YouTube - Hide shorts components): Add separate option to hide i…
Browse files Browse the repository at this point in the history
…n player
  • Loading branch information
anddea committed May 3, 2024
1 parent 9f0636e commit 67cfeb8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ private static boolean shouldHideShortsFeedItems() {
final boolean hideHome = SettingsEnum.HIDE_SHORTS_HOME.getBoolean();
final boolean hideSubscriptions = SettingsEnum.HIDE_SHORTS_SUBSCRIPTIONS.getBoolean();
final boolean hideSearch = SettingsEnum.HIDE_SHORTS_SEARCH.getBoolean();
final boolean hidePlayer = SettingsEnum.HIDE_SHORTS_PLAYER.getBoolean();

if (hideHome && hideSubscriptions && hideSearch) {
// Shorts suggestions can load in the background if a video is opened and
Expand All @@ -311,7 +312,7 @@ private static boolean shouldHideShortsFeedItems() {
// Must check player type first, as search bar can be active behind the player.
if (PlayerType.getCurrent().isMaximizedOrFullscreen()) {
// For now, consider the under video results the same as the home feed.
return hideHome;
return hidePlayer;
}

if (NavigationBar.isSearchBarActive()) { // Must check search first.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ public enum SettingsEnum {
HIDE_SHORTS_HOME("revanced_hide_shorts_shelf_home", BOOLEAN, TRUE, parents(HIDE_SHORTS_SHELF)),
HIDE_SHORTS_SEARCH("revanced_hide_shorts_shelf_search", BOOLEAN, TRUE, parents(HIDE_SHORTS_SHELF)),
HIDE_SHORTS_SUBSCRIPTIONS("revanced_hide_shorts_shelf_subscriptions", BOOLEAN, TRUE, parents(HIDE_SHORTS_SHELF)),
HIDE_SHORTS_PLAYER("revanced_hide_shorts_shelf_player", BOOLEAN, TRUE, parents(HIDE_SHORTS_SHELF)),

// Experimental Flags
HIDE_SHORTS_PLAYER_NAVIGATION_BAR("revanced_hide_shorts_player_navigation_bar", BOOLEAN, FALSE, true),
Expand Down

0 comments on commit 67cfeb8

Please sign in to comment.