aboutsummaryrefslogtreecommitdiff
path: root/worker
diff options
context:
space:
mode:
authorinwit <inwit@sindominio.net>2023-10-29 23:45:55 +0100
committerRobin Jarry <robin@jarry.cc>2023-11-02 11:59:39 +0100
commit9ce4af011c93e2816ce04012f6205b54e0ed1d51 (patch)
treed7bc32021b9e40bafd26f034d5b44ab7300e5e47 /worker
parent2bf8fb42980ea981da34e104d8cfd0d1e3da788b (diff)
downloadaerc-9ce4af011c93e2816ce04012f6205b54e0ed1d51.tar.gz
aerc-9ce4af011c93e2816ce04012f6205b54e0ed1d51.zip
fold: allow for multiple folding levels
Extend the :fold/:unfold behaviour to allow for multiple folding levels. Signed-Off-By: inwit <inwit@sindominio.net> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'worker')
-rw-r--r--worker/notmuch/lib/database.go6
-rw-r--r--worker/types/thread.go2
2 files changed, 6 insertions, 2 deletions
diff --git a/worker/notmuch/lib/database.go b/worker/notmuch/lib/database.go
index 015126c2..b2a22227 100644
--- a/worker/notmuch/lib/database.go
+++ b/worker/notmuch/lib/database.go
@@ -336,7 +336,11 @@ func (db *DB) makeThread(parent *types.Thread, msgs *notmuch.Messages, threadCon
case true:
node.Context = !match
default:
- node.Hidden = !match
+ if match {
+ node.Hidden = 0
+ } else {
+ node.Hidden = 1
+ }
}
if parent != nil && parent.FirstChild == nil {
parent.FirstChild = node
diff --git a/worker/types/thread.go b/worker/types/thread.go
index 75651280..b4f5ac5f 100644
--- a/worker/types/thread.go
+++ b/worker/types/thread.go
@@ -15,7 +15,7 @@ type Thread struct {
NextSibling *Thread
FirstChild *Thread
- Hidden bool // if this flag is set the message isn't rendered in the UI
+ Hidden int // if this flag is not zero the message isn't rendered in the UI
Deleted bool // if this flag is set the message was deleted
// Context indicates the message doesn't match the mailbox / query but