mirror of
https://github.com/discourse/discourse.git
synced 2026-09-05 04:40:41 -05:00
Let's remove the Singleton usage of SiteSettings from Sharing
This commit is contained in:
@@ -26,6 +26,6 @@ export default Ember.Controller.extend({
|
||||
},
|
||||
|
||||
sources: function() {
|
||||
return Sharing.activeSources();
|
||||
return Sharing.activeSources(this.siteSettings.share_links);
|
||||
}.property()
|
||||
});
|
||||
|
||||
@@ -31,8 +31,7 @@ export default {
|
||||
_sources[source.id] = source;
|
||||
},
|
||||
|
||||
activeSources() {
|
||||
const enabled = Discourse.SiteSettings.share_links.split('|');
|
||||
return enabled.map(s => _sources[s]).compact();
|
||||
activeSources(linksSetting) {
|
||||
return linksSetting.split('|').map(s => _sources[s]).compact();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user