Skip to content

Commit

Permalink
REFACTOR: Remove Discourse.SiteSettings from topic model
Browse files Browse the repository at this point in the history
  • Loading branch information
eviltrout committed Jul 21, 2020
1 parent ec4024f commit ccb36f8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/assets/javascripts/discourse/app/models/topic.js
Expand Up @@ -124,7 +124,7 @@ const Topic = RestModel.extend({
Site.currentProp("censored_regexp")
);

if (Discourse.SiteSettings.support_mixed_text_direction) {
if (this.siteSettings.support_mixed_text_direction) {
const titleDir = isRTL(title) ? "rtl" : "ltr";
return `<span dir="${titleDir}">${fancyTitle}</span>`;
}
Expand Down Expand Up @@ -171,7 +171,7 @@ const Topic = RestModel.extend({

@discourseComputed("tags")
visibleListTags(tags) {
if (!tags || !Discourse.SiteSettings.suppress_overlapping_tags_in_list) {
if (!tags || !this.siteSettings.suppress_overlapping_tags_in_list) {
return tags;
}

Expand Down Expand Up @@ -338,13 +338,13 @@ const Topic = RestModel.extend({

@discourseComputed("views")
viewsHeat(v) {
if (v >= Discourse.SiteSettings.topic_views_heat_high) {
if (v >= this.siteSettings.topic_views_heat_high) {
return "heatmap-high";
}
if (v >= Discourse.SiteSettings.topic_views_heat_medium) {
if (v >= this.siteSettings.topic_views_heat_medium) {
return "heatmap-med";
}
if (v >= Discourse.SiteSettings.topic_views_heat_low) {
if (v >= this.siteSettings.topic_views_heat_low) {
return "heatmap-low";
}
return null;
Expand Down

0 comments on commit ccb36f8

Please sign in to comment.