From ef06967f85f9e38ac939ffafcc847663164f455e Mon Sep 17 00:00:00 2001 From: ralf Date: Wed, 28 Jun 2023 07:29:38 +0200 Subject: [PATCH] * Mail: improve performace by skiping search for avatar images in contacts in favor of loading them when they become visible fix regular expression --- api/js/etemplate/Et2Avatar/Et2Avatar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/js/etemplate/Et2Avatar/Et2Avatar.ts b/api/js/etemplate/Et2Avatar/Et2Avatar.ts index d58be75fa6..a7e7006b11 100644 --- a/api/js/etemplate/Et2Avatar/Et2Avatar.ts +++ b/api/js/etemplate/Et2Avatar/Et2Avatar.ts @@ -200,7 +200,7 @@ export class Et2Avatar extends Et2Widget(SlotMixin(SlAvatar)) implements et2_IDe let oldContactId = this._contactId; this._contactId = _contactId; // if our image (incl. cache-buster) already includes the correct id, use that one - if(!this.image || !this.image.match("(&|\\?)contact_id=" + parsedId + "(&|\\$)")) + if(!this.image || !this.image.match("(&|\\?)" + id + "=" + encodeURIComponent(parsedId) + "(&|$)")) { params[id] = parsedId; this.image = egw.link('/api/avatar.php', params);