DEV: Replace narrowDesktopView logic with viewport API (#1372)

This commit is contained in:
David Taylor 2025-05-29 21:52:39 +01:00 committed by GitHub
parent c06d7b07d5
commit 59d6e2b467
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,9 +19,7 @@ export default class AiFullPageDiscobotDiscoveries extends Component {
@service site;
get previewLength() {
// todo: replace with js breakpoint API
// https://github.com/discourse/discourse/pull/32060
if (this.site.mobileView || this.site.narrowDesktopView) {
if (!this.capabilities.viewport.md) {
return 50;
} else {
return 10000;