Fixes
This commit is contained in:
parent
93f08b715b
commit
b7a769e883
|
@ -8,7 +8,7 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Utils, FileUtils, AsyncEventEmitter } from 'common';
|
import { Utils, FileUtils, ClientLogger as Logger, AsyncEventEmitter } from 'common';
|
||||||
import { Modals } from 'ui';
|
import { Modals } from 'ui';
|
||||||
|
|
||||||
export default class Content {
|
export default class Content {
|
||||||
|
|
|
@ -136,17 +136,17 @@ export default class SettingsCategory {
|
||||||
setting.off('settings-updated', setting[this._eventsKey + '_settingscategory_event_settings-updated']);
|
setting.off('settings-updated', setting[this._eventsKey + '_settingscategory_event_settings-updated']);
|
||||||
|
|
||||||
let index;
|
let index;
|
||||||
while ((index = this.settings.findIndex(c => c === category)) > -1) {
|
while ((index = this.settings.findIndex(s => s === setting)) > -1) {
|
||||||
this.settings.splice(index, 0);
|
this.settings.splice(index, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
const event = {
|
const event = {
|
||||||
set: this, set_id: this.id,
|
set: this, set_id: this.id,
|
||||||
category, category_id: category.id,
|
category: this, category_id: this.id,
|
||||||
from_index: index
|
from_index: index
|
||||||
};
|
};
|
||||||
|
|
||||||
await category.emit('removed-from', event);
|
await setting.emit('removed-from', event);
|
||||||
await this.emit('removed-category', event);
|
await this.emit('removed-category', event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue