From 54a0a377e03074a27d7d9e84092487c55761b510 Mon Sep 17 00:00:00 2001 From: Koni Marti Date: Tue, 26 Jul 2022 15:41:13 +0200 Subject: threads: debounce client-side thread building Debounce client-side thread building in the message store. Debouncing is useful when multiple messages are loaded, i.e. when scrolling with PgUp/PgDown. Without the debouncing, all client-side threads will be built everytime the message store is updated which creates a noticable lag in the message list ui when client-side threading is activated. The default debouncing delay can be changed by changing 'client-threads-delay' in the UI config section. Signed-off-by: Koni Marti Acked-by: Robin Jarry --- widgets/msglist.go | 1 + 1 file changed, 1 insertion(+) (limited to 'widgets/msglist.go') diff --git a/widgets/msglist.go b/widgets/msglist.go index 4c7c1c2..95dfa1f 100644 --- a/widgets/msglist.go +++ b/widgets/msglist.go @@ -344,6 +344,7 @@ func (ml *MessageList) storeUpdate(store *lib.MessageStore) { if ml.Store() != store { return } + ml.Invalidate() } func (ml *MessageList) SetStore(store *lib.MessageStore) { -- cgit v1.2.3