]> git.proxmox.com Git - pmg-gui.git/commitdiff
quarantine: restore behavior of selecting next in list after action
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 1 Apr 2021 11:40:03 +0000 (13:40 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 1 Apr 2021 11:42:53 +0000 (13:42 +0200)
This fixes a UX regression stemming from the recently introduced
commit 9aed379a700a0bc3bc26fa32d43a5bab75eb206b
"spam quarantine: avoid full store reload on single-element actions"

A load restored the saved selection after load complete, with the
neat and very useful feature to jump to the next in line if the old
one did not exist anymore.

Call this now factored out code part ourself in the fast-path.

This was reported in the forum:
https://forum.proxmox.com/threads/proxmox-mail-gateway-6-4-released.86760/#post-380971

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
js/SpamQuarantine.js

index a68568602e5ef136668daf47b1b38cbe65b5153d..f580ab3cf468f922a187c5273b6396a72f855b3a 100644 (file)
@@ -163,6 +163,7 @@ Ext.define('PMG.SpamQuarantine', {
            PMG.Utils.doQuarantineAction(action, selected[0].data.id, function() {
                // success -> remove directly to avoid slow store reload for a single-element action
                list.getStore().remove(selected[0]);
            PMG.Utils.doQuarantineAction(action, selected[0].data.id, function() {
                // success -> remove directly to avoid slow store reload for a single-element action
                list.getStore().remove(selected[0]);
+               list.getController().restoreSavedSelection();
            });
        },
 
            });
        },