mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Let's remove the Singleton usage of SiteSettings
from Sharing
This commit is contained in:
parent
1eecd7418e
commit
96697c7957
@ -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();
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user