msgstore: do not run threadbuilder unless in threaded view

Commit 380cf13cff ("msgstore: run threadBuilder with no debounce on
DirectoryContents msg") fixed an issue related to running the
threadbuilder with a debounce. This fix causes the thread builder to run
for any DirectoryContents message, even if the view is not threaded.

Don't call runThreadBuilderNow unless in a threaded view.

Fixes: 380cf13cff ("msgstore: run threadBuilder with no debounce on DirectoryContents msg")
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
Tim Culverhouse 2022-08-30 18:24:59 -05:00 committed by Robin Jarry
parent af9390d38b
commit cd002567e8
1 changed files with 3 additions and 1 deletions

View File

@ -209,7 +209,9 @@ func (store *MessageStore) Update(msg types.WorkerMessage) {
}
store.Messages = newMap
store.uids = msg.Uids
store.runThreadBuilderNow()
if store.threadedView {
store.runThreadBuilderNow()
}
case *types.DirectoryThreaded:
var uids []uint32
newMap := make(map[uint32]*models.MessageInfo)