Skip to content

A platform for community discussion. Free, open, simple.

DEV: Use transformed `useMobileLayout` value in topic-list/item (#31128)

David Taylora8e10521c342
diff --git a/app/assets/javascripts/discourse/app/components/topic-list/item.gjs b/app/assets/javascripts/discourse/app/components/topic-list/item.gjs
index 8c2a08b8249..7327c235ec4 100644
--- a/app/assets/javascripts/discourse/app/components/topic-list/item.gjs
+++ b/app/assets/javascripts/discourse/app/components/topic-list/item.gjs
@@ -58,7 +58,7 @@ export default class Item extends Component {
let expandPinned;
if (
!this.args.topic.pinned ||
- (this.site.mobileView && !this.siteSettings.show_pinned_excerpt_mobile) ||
+ (this.useMobileLayout && !this.siteSettings.show_pinned_excerpt_mobile) ||
(this.site.desktopView && !this.siteSettings.show_pinned_excerpt_desktop)
) {
expandPinned = false;
@@ -71,7 +71,7 @@ export default class Item extends Component {
return applyValueTransformer(
"topic-list-item-expand-pinned",
expandPinned,
- { topic: this.args.topic, mobileView: this.site.mobileView }
+ { topic: this.args.topic, mobileView: this.useMobileLayout }
);
}