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

Commit

Permalink
fix(YouTube - Hide feed components): Hide carousel shelf setting so…
Browse files Browse the repository at this point in the history
…metimes hides the Watch history in the You tab
  • Loading branch information
anddea committed Jul 18, 2024
1 parent 1400597 commit 97ea082
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package app.revanced.integrations.youtube.patches.components;

import static app.revanced.integrations.youtube.shared.NavigationBar.NavigationButton;

import androidx.annotation.Nullable;

import org.apache.commons.lang3.StringUtils;
Expand Down Expand Up @@ -227,7 +229,14 @@ private static boolean hideShelves() {
// Check browseId last.
// Only filter in home feed, search results, playlist.
final String browseId = RootView.getBrowseId();
return browseId.isEmpty() || StringUtils.startsWithAny(browseId, BROWSE_ID_DEFAULT, BROWSE_ID_PLAYLIST);

if (StringUtils.startsWithAny(browseId, BROWSE_ID_DEFAULT, BROWSE_ID_PLAYLIST)) {
return true;
} else if (browseId.isEmpty()) {
NavigationButton selectedNavButton = NavigationButton.getSelectedNavigationButton();
return selectedNavButton != null && !selectedNavButton.isLibraryOrYouTab();
}
return false;
}

@Override
Expand Down

0 comments on commit 97ea082

Please sign in to comment.