aboutsummaryrefslogtreecommitdiffstats
path: root/lib/threadbuilder.go
diff options
context:
space:
mode:
authorKoni Marti <koni.marti@gmail.com>2023-07-14 20:37:30 +0200
committerRobin Jarry <robin@jarry.cc>2023-07-16 10:12:52 +0200
commitc2bcc4bde8b8266d63d447bbfa46acc528ad7dfd (patch)
tree58411ebcb31c447a2016c3506b98068f92470e5c /lib/threadbuilder.go
parent058eb32c46472554117c5e9d022ff98c617eb99f (diff)
downloadaerc-c2bcc4bde8b8266d63d447bbfa46acc528ad7dfd.tar.gz
store: implement thread folding
Implement thread folding on the message store level. Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc> Tested-by: inwit <inwit@sindominio.net>
Diffstat (limited to 'lib/threadbuilder.go')
-rw-r--r--lib/threadbuilder.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/threadbuilder.go b/lib/threadbuilder.go
index 793034df..1f2d72c6 100644
--- a/lib/threadbuilder.go
+++ b/lib/threadbuilder.go
@@ -198,11 +198,17 @@ func (builder *ThreadBuilder) RebuildUids(threads []*types.Thread, inverse bool)
var threaduids []uint32
_ = iterT.Value().(*types.Thread).Walk(
func(t *types.Thread, level int, currentErr error) error {
+ stored, ok := builder.threadMap[t.Uid]
+ if ok {
+ // make this info persistent
+ t.Hidden = stored.Hidden
+ t.Deleted = stored.Deleted
+ }
+ builder.threadMap[t.Uid] = t
if t.Deleted || t.Hidden {
return nil
}
threaduids = append(threaduids, t.Uid)
- builder.threadMap[t.Uid] = t
return nil
})
if inverse {