From: Thomas Lamprecht Date: Thu, 1 Apr 2021 11:40:03 +0000 (+0200) Subject: quarantine: restore behavior of selecting next in list after action X-Git-Url: https://git.proxmox.com/?p=pmg-gui.git;a=commitdiff_plain;h=642aba90edfd35c03104dbf645ff1e5b6f8a13be quarantine: restore behavior of selecting next in list after action 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 --- diff --git a/js/SpamQuarantine.js b/js/SpamQuarantine.js index a685686..f580ab3 100644 --- a/js/SpamQuarantine.js +++ b/js/SpamQuarantine.js @@ -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]); + list.getController().restoreSavedSelection(); }); },