From 8628b50ffbb1baa183b0c7133569c52c62a358af Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 24 Aug 2020 12:35:06 -0600 Subject: [PATCH] * Mail: Fix deleting or moving multiple mail to another folder did not update the list --- mail/inc/class.mail_ui.inc.php | 6 +++++- mail/js/app.js | 11 +++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index cb84abfc10..0d32b33b43 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -5538,7 +5538,11 @@ $filter['before']= date("d-M-Y", $cutoffdate2); { $msg = lang('moved %1 message(s) from %2 to %3',($messageList=='all'||$_messageList['all']?($filtered?lang('all filtered'):lang('all')):count($messageList)),lang($folder),lang($targetFolder)); if ($_return) return $msg; - $response->call('egw.refresh',$msg,'mail',$messageListForRefresh,'delete'); + foreach($messageListForRefresh as $mail_id) + { + $response->call('egw.refresh','','mail',$mail_id, 'delete'); + } + $response->message($msg,'success'); } } if ($changeFolderActions == true) diff --git a/mail/js/app.js b/mail/js/app.js index d35fb8e2ad..05c1b5c6f8 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -2189,11 +2189,7 @@ app.classes.mail = AppJS.extend( mail_deleteMessagesShowResult: function(_msg) { // Update list - var ids = []; - for (var i = 0; i < _msg['msg'].length; i++) - { - ids.push(_msg['msg'][i].replace(/mail::/,'')); - } + //this.egw.message(_msg['egw_message']); if (_msg['all']) { @@ -2201,7 +2197,10 @@ app.classes.mail = AppJS.extend( } else { - this.egw.refresh(_msg['egw_message'],'mail',ids,'delete'); + for (var i = 0; i < _msg['msg'].length; i++) + { + this.egw.refresh(_msg['egw_message'], 'mail', _msg['msg'][i].replace(/mail::/,''), 'delete'); + } // Nextmatch automatically selects the next row and calls preview. // Unselect it and thanks to the timeout selectionMgr uses, preview