From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Dominik Csapak <d.csapak@proxmox.com>, pmg-devel@lists.proxmox.com
Subject: [pmg-devel] applied: [PATCH pmg-gui 1/5] simply quarantine controllers a bit
Date: Mon, 7 Nov 2022 09:47:22 +0100 [thread overview]
Message-ID: <f583a683-dc13-ecd2-ec7e-9d8578628d95@proxmox.com> (raw)
In-Reply-To: <20221104150425.124194-3-d.csapak@proxmox.com>
s/simply/simplify/, but I actually adapted it to
"quarantine controller: drop specialized classes, check at runtime instead"
(but the original was quite OK too, just had to fix this and another
typo anyway)
Am 04/11/2022 um 16:04 schrieb Dominik Csapak:
> by making use of the optional chaining operator, we don't need to
> override the 'onSelectMail' if both the attachment quarantine and the
> spam quarantine. simply call lookup(id)?.setID everytime for both the
> attachments and the spaminfo
>
> this makes the seperate attachment quarantine controller unnecessary.
I was a bit suspicious at first, as dropping some code by adding a runtime
(overhead check isn't always a benefit, but checking it out in context it
seems OK enough (quite a bit of code dropped and only a small overhead).
Alternative could be to add a single (or array of) property of reference IDs
we set the ID on, as config for the controller class, that could then be set
on instatation, but I don't think this will change much (as in new Q types
getting added or the like) and it's also really a much to small thing to
bother, so just mentioning for completeness sake.
>
> also remove the stray 'xtype' of the QuarantineController
> (it's not a component, thus no xtype)
no biggie but you might just push that as separate patch directly next
time.
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> js/AttachmentQuarantine.js | 30 +--------------------------
> js/SpamQuarantine.js | 13 ------------
> js/controller/QuarantineController.js | 3 ++-
> 3 files changed, 3 insertions(+), 43 deletions(-)
>
>
applied, thanks!
next prev parent reply other threads:[~2022-11-07 8:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 15:04 [pmg-devel] [PATCH pmg-api/pmg-gui] improvements to the quarantine interface Dominik Csapak
2022-11-04 15:04 ` [pmg-devel] [PATCH pmg-api 1/1] api/quarantine: allow 'listattachments' for quarantine users Dominik Csapak
2022-11-07 8:47 ` [pmg-devel] applied: " Thomas Lamprecht
2022-11-04 15:04 ` [pmg-devel] [PATCH pmg-gui 1/5] simply quarantine controllers a bit Dominik Csapak
2022-11-07 8:47 ` Thomas Lamprecht [this message]
2022-11-04 15:04 ` [pmg-devel] [PATCH pmg-gui 2/5] quarantines: add attachment grid to spam and virus quarantine Dominik Csapak
2022-11-07 12:21 ` [pmg-devel] applied: " Thomas Lamprecht
2022-11-04 15:04 ` [pmg-devel] [PATCH pmg-gui 3/5] fix #4238: SpamInfoGrid: enable sorting & add colors for spam score Dominik Csapak
2022-11-07 9:56 ` [pmg-devel] applied: " Thomas Lamprecht
2022-11-04 15:04 ` [pmg-devel] [PATCH pmg-gui 4/5] quarantine: improve borders for docked items Dominik Csapak
2022-11-07 9:57 ` [pmg-devel] applied: " Thomas Lamprecht
2022-11-04 15:04 ` [pmg-devel] [PATCH pmg-gui 5/5] fix #2533: quarantine: add overflowHandler to the preview panel Dominik Csapak
2022-11-07 9:57 ` [pmg-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f583a683-dc13-ecd2-ec7e-9d8578628d95@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=d.csapak@proxmox.com \
--cc=pmg-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox