]> git.proxmox.com Git - pmg-gui.git/blobdiff - js/SpamQuarantine.js
spam quarantine: avoid resetting saved position when removing single element
[pmg-gui.git] / js / SpamQuarantine.js
index 58cf74cc2a6bb2c1588636db67692b4688576a8f..efb7fdc91dcb743bc92ab8e0d48a904c549f02f5 100644 (file)
@@ -164,9 +164,12 @@ Ext.define('PMG.SpamQuarantine', {
            }
 
            PMG.Utils.doQuarantineAction(action, selected[0].data.id, function() {
+               let listController = list.getController();
+               listController.allowPositionSave = false;
                // success -> remove directly to avoid slow store reload for a single-element action
                list.getStore().remove(selected[0]);
-               list.getController().restoreSavedSelection();
+               listController.restoreSavedSelection();
+               listController.allowPositionSave = true;
            });
        },