aboutsummaryrefslogtreecommitdiffstats
path: root/lib/msgstore.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/msgstore.go')
-rw-r--r--lib/msgstore.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go
index 6710fa56..c02d8f4d 100644
--- a/lib/msgstore.go
+++ b/lib/msgstore.go
@@ -368,8 +368,16 @@ func (store *MessageStore) update(threads bool) {
if store.onUpdateDirs != nil {
store.onUpdateDirs()
}
- if store.BuildThreads() && store.ThreadedView() && threads {
- store.runThreadBuilder()
+ if store.ThreadedView() && threads {
+ switch {
+ case store.BuildThreads():
+ store.runThreadBuilder()
+ default:
+ if store.builder == nil {
+ store.builder = NewThreadBuilder(store.iterFactory)
+ }
+ store.builder.RebuildUids(store.Threads(), store.reverseThreadOrder)
+ }
}
}