Skip to content

Commit 5f3e48e

Browse files
fix(YouTube - Hide layout components): Do not hide playlist sort button if 'Hide AI comments summary' is on
1 parent 9f73eea commit 5f3e48e

File tree

1 file changed

+4
-1
lines changed
  • extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/components

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import androidx.annotation.Nullable;
44

55
import app.revanced.extension.youtube.settings.Settings;
6+
import app.revanced.extension.youtube.shared.PlayerType;
67

78
@SuppressWarnings("unused")
89
final class CommentsFilter extends Filter {
@@ -89,7 +90,9 @@ public CommentsFilter() {
8990
boolean isFiltered(@Nullable String identifier, String path, byte[] protobufBufferArray,
9091
StringFilterGroup matchedGroup, FilterContentType contentType, int contentIndex) {
9192
if (matchedGroup == chipBar) {
92-
return aiCommentsSummary.check(protobufBufferArray).isFiltered();
93+
// Playlist sort button uses same components and must only filter if the player is opened.
94+
return PlayerType.getCurrent().isMaximizedOrFullscreen()
95+
&& aiCommentsSummary.check(protobufBufferArray).isFiltered();
9396
}
9497

9598
return true;

0 commit comments

Comments
 (0)