Rename new Settings.saveSettings to Settings.mergeSettings

This commit is contained in:
Samuel Elliott 2018-02-14 16:32:12 +00:00
parent dcb2704a28
commit 0cfb6d36ca
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
3 changed files with 7 additions and 6 deletions

View File

@ -41,7 +41,7 @@ export default class {
/** /**
* Update css in client * Update css in client
* @param {String} scss scss to compile * @param {String} scss scss to compile
* @param {bool} sendSource send to css editor instance * @param {bool} sendSource send to css editor instance
*/ */
static updateScss(scss, sendSource) { static updateScss(scss, sendSource) {
if (sendSource) if (sendSource)
@ -86,7 +86,7 @@ export default class {
/** /**
* Send css to open editor * Send css to open editor
* @param {any} channel * @param {any} channel
* @param {any} data * @param {any} data
*/ */
static async sendToEditor(channel, data) { static async sendToEditor(channel, data) {
@ -94,14 +94,14 @@ export default class {
} }
/** /**
* Current uncompiled scss * Current uncompiled scss
*/ */
static get scss() { static get scss() {
return this._scss || ''; return this._scss || '';
} }
/** /**
* Set current scss * Set current scss
*/ */
static set scss(scss) { static set scss(scss) {
this.updateScss(scss, true); this.updateScss(scss, true);

View File

@ -113,7 +113,7 @@ export default class {
return setting ? setting.value : undefined; return setting ? setting.value : undefined;
} }
static saveSettings(set_id, newSettings, settingsUpdated) { static mergeSettings(set_id, newSettings, settingsUpdated) {
const set = this.getSet(set_id); const set = this.getSet(set_id);
if (!set) return; if (!set) return;
const updatedSettings = []; const updatedSettings = [];
@ -132,6 +132,7 @@ export default class {
} }
} }
this.saveSettings();
return settingsUpdated ? settingsUpdated(updatedSettings) : updatedSettings; return settingsUpdated ? settingsUpdated(updatedSettings) : updatedSettings;
} }

View File

@ -105,7 +105,7 @@ export default class {
static internalSettings(set_id) { static internalSettings(set_id) {
const set = Settings.getSet(set_id); const set = Settings.getSet(set_id);
if (!set) return; if (!set) return;
return this.settings(set.headertext, set.settings, null, null, newSettings => Settings.saveSettings(set.id, newSettings)); return this.settings(set.headertext, set.settings, null, null, newSettings => Settings.mergeSettings(set.id, newSettings));
} }
static contentSettings(content) { static contentSettings(content) {