aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2023-09-25 09:07:44 -0500
committerRobin Jarry <robin@jarry.cc>2023-09-27 23:14:14 +0200
commit55bcca4a31f29d58f2cc07dc0b17e2fd7da5f590 (patch)
treee111e87e260b219cd936b326ab3f9186356a373b /lib
parent4ec1e1a5e4c74236a6d1992c8778c39fd25d847b (diff)
downloadaerc-55bcca4a31f29d58f2cc07dc0b17e2fd7da5f590.tar.gz
commands: add :toggle-thread-context command
Add a command to toggle the display of an thread-context. Update CHANGELOG. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Tested-by: Inwit <inwit@sindominio.net> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'lib')
-rw-r--r--lib/msgstore.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go
index 6186b195..ab48f331 100644
--- a/lib/msgstore.go
+++ b/lib/msgstore.go
@@ -442,6 +442,14 @@ func (store *MessageStore) ThreadedView() bool {
return store.threadedView
}
+func (store *MessageStore) ToggleThreadContext() {
+ if !store.threadedView {
+ return
+ }
+ store.threadContext = !store.threadContext
+ store.Sort(store.sortCriteria, nil)
+}
+
func (store *MessageStore) BuildThreads() bool {
return store.buildThreads
}