From ccd042889f6d8aa78b70c01395ef69aec48ac48c Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Tue, 5 Jul 2022 14:48:39 -0500 Subject: threading: add force-client-threads option This patch adds a config option to force the use of client side threads. This option will override a servers Thread capability, and only build threads on the client. It can be enabled contextually. For example: [ui] threading-enabled = true [ui:folder~^Archive] force-client-threads = true This config would enable threads for all views, and use client threads for folders that start with Archive. This can be advantageous if, for example, the folder is very large and the server has a slow response due to building threads for the entire mailbox Signed-off-by: Tim Culverhouse Acked-by: Robin Jarry --- lib/msgstore.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/msgstore.go') diff --git a/lib/msgstore.go b/lib/msgstore.go index 0eb5682..99ae594 100644 --- a/lib/msgstore.go +++ b/lib/msgstore.go @@ -60,13 +60,12 @@ type MessageStore struct { func NewMessageStore(worker *types.Worker, dirInfo *models.DirectoryInfo, defaultSortCriteria []*types.SortCriterion, - thread bool, + thread bool, clientThreads bool, triggerNewEmail func(*models.MessageInfo), triggerDirectoryChange func()) *MessageStore { dirInfoUpdateDelay := 5 * time.Second - var clientThreads bool if !dirInfo.Caps.Thread { clientThreads = true } -- cgit v1.2.3