Skip to content

Commit 3864f35

Browse files
fix(YouTube - Hide layout components): Do not hide video description music/game links if hide horizontal shelves is enabled
1 parent 8e91507 commit 3864f35

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/components/LayoutComponentsFilter.java

+10-6
Original file line numberDiff line numberDiff line change
@@ -454,16 +454,20 @@ public static void hideShowMoreButton(View view) {
454454
}
455455

456456
private static boolean hideShelves() {
457-
// If the player is opened while library is selected,
458-
// then filter any recommendations below the player.
459-
if (PlayerType.getCurrent().isMaximizedOrFullscreen()
460-
// Or if the search is active while library is selected, then also filter.
461-
|| NavigationBar.isSearchBarActive()) {
457+
// Horizontal shelves are used for music/game links in video descriptions,
458+
// such as https://youtube.com/watch?v=W8kI1na3S2M
459+
if (PlayerType.getCurrent().isMaximizedOrFullscreen()) {
460+
return false;
461+
}
462+
463+
// Must check search bar after player type, since search results
464+
// can be in the background behind an open player.
465+
if (NavigationBar.isSearchBarActive()) {
462466
return true;
463467
}
464468

465469
// Do not hide if the navigation back button is visible,
466-
// otherwise the content shelves in the YouTube Movie/Courses pages is hidden.
470+
// otherwise the content shelves in the explore/music/courses pages are hidde.
467471
if (NavigationBar.isBackButtonVisible()) {
468472
return false;
469473
}

0 commit comments

Comments
 (0)