From d8290f035bd1ca74c51713c8b457ae16ae8502a4 Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 19 Apr 2023 11:57:23 -0600 Subject: [PATCH] Mail: Fix moving folder hangs showing waiting icon --- mail/js/app.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/mail/js/app.js b/mail/js/app.js index 5dd6ca341c..fccd61afcf 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -3824,16 +3824,16 @@ app.classes.mail = AppJS.extend( egw.loading_prompt('mail_moveFolder', true, '', '#egw_fw_basecontainer'); for (var i = 0; i < _senders.length; i++) { - egw.jsonq('mail.mail_ui.ajax_MoveFolder', [_senders[i].id, destination.id], - // Move is done (successfully or not), remove loading - function () - { - var id = destination.id.split('::'); - //refersh the top parent - ftree.refreshItem(id[0], null); - egw.loading_prompt('mail_moveFolder', false); - } - ); + egw.request('mail.mail_ui.ajax_MoveFolder', [_senders[i].id, destination.id]) + .finally(() => + { + // Move is done (successfully or not), remove loading + var id = destination.id.split('::'); + //refersh the top parent + ftree.refreshItem(id[0], null); + egw.loading_prompt('mail_moveFolder', false); + } + ); } } };