From 0f02cc6d29b07cd6d89d66924b8d3e5c7e6b57a5 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Wed, 8 Jun 2022 13:08:27 +0200 Subject: [PATCH] Speedup flags cache --- dev/Common/Cache.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dev/Common/Cache.js b/dev/Common/Cache.js index 9b2405a49..3e7ff57b6 100644 --- a/dev/Common/Cache.js +++ b/dev/Common/Cache.js @@ -121,7 +121,7 @@ export class MessageFlagsCache if (message) { const uid = message.uid, flags = this.getFor(message.folder, uid), - thread = message.threads; + thread = message.threads(); if (isArray(flags)) { message.flags(flags); @@ -142,9 +142,7 @@ export class MessageFlagsCache * @param {(MessageModel|null)} message */ static store(message) { - if (message) { - this.setFor(message.folder, message.uid, message.flags()); - } + message && this.setFor(message.folder, message.uid, message.flags()); } /**