Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 4928dfe

Browse files
committed
DEV: Replace narrowDesktopView logic with viewport API
1 parent 6781ecd commit 4928dfe

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

assets/javascripts/discourse/connectors/full-page-search-below-search-header/ai-full-page-discobot-discoveries.gjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ export default class AiFullPageDiscobotDiscoveries extends Component {
1919
@service site;
2020

2121
get previewLength() {
22-
// todo: replace with js breakpoint API
23-
// https://github.com/discourse/discourse/pull/32060
24-
if (this.site.mobileView || this.site.narrowDesktopView) {
22+
if (!this.capabilities.viewport.md) {
2523
return 50;
2624
} else {
2725
return 10000;

0 commit comments

Comments
 (0)