mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Fix sorting errors
This commit is contained in:
@@ -140,7 +140,7 @@ function onSortPlugins() {
|
||||
loot.Dialog.showNotification(loot.l10n.translate('Sorting made no changes to the load order.'));
|
||||
return;
|
||||
}
|
||||
loot.game.updatePlugins(result.plugins);
|
||||
loot.game.setSortedPlugins(result.plugins);
|
||||
|
||||
/* Now update the UI for the new order. */
|
||||
loot.filters.apply(loot.game.plugins);
|
||||
@@ -159,7 +159,8 @@ function onApplySort() {
|
||||
}).catch(loot.handlePromiseError);
|
||||
}
|
||||
function onCancelSort() {
|
||||
return loot.query('cancelSort').then(JSON.parse).then(loot.game.cancelSort).then(() => {
|
||||
return loot.query('cancelSort').then(JSON.parse).then((globalMessages) => {
|
||||
loot.game.cancelSort(globalMessages);
|
||||
/* Sort UI elements again according to stored old load order. */
|
||||
loot.filters.apply(loot.game.plugins);
|
||||
|
||||
|
||||
@@ -305,12 +305,12 @@
|
||||
}
|
||||
|
||||
applySort() {
|
||||
delete this.oldLoadOrder;
|
||||
this.oldLoadOrder = undefined;
|
||||
}
|
||||
|
||||
cancelSort(globalMessages) {
|
||||
this.plugins = this.oldLoadOrder;
|
||||
delete this.oldLoadOrder;
|
||||
this.oldLoadOrder = undefined;
|
||||
|
||||
/* Update general messages */
|
||||
this.globalMessages = globalMessages;
|
||||
@@ -321,7 +321,6 @@
|
||||
plugins.forEach((plugin) => {
|
||||
const existingPlugin = this.plugins.find(item => item.name === plugin.name);
|
||||
if (existingPlugin) {
|
||||
//delete existingPlugin.userlist;
|
||||
existingPlugin.userlist = undefined;
|
||||
|
||||
existingPlugin.update(plugin);
|
||||
|
||||
Reference in New Issue
Block a user