summaryrefslogtreecommitdiff
path: root/widgets/account.go
diff options
context:
space:
mode:
authory0ast <joost@joo.st>2021-11-12 18:12:02 +0100
committerRobin Jarry <robin@jarry.cc>2021-11-13 15:05:59 +0100
commitdc2a2c2dfd6dc327fe40fbf2da922ef6c3d520be (patch)
tree4987160692aca01e27b068cb256d66d373556a52 /widgets/account.go
parentc303b953360994966ff657c4e17670853198ecf7 (diff)
downloadaerc-dc2a2c2dfd6dc327fe40fbf2da922ef6c3d520be.zip
messages: allow displaying email threads
Display threads in the message list. For now, only supported by the notmuch backend and on IMAP when the server supports the THREAD extension. Setting threading-enable=true is global and will cause the message list to be empty with maildir:// accounts. Co-authored-by: Kevin Kuehler <keur@xcf.berkeley.edu> Co-authored-by: Reto Brunner <reto@labrat.space> Signed-off-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'widgets/account.go')
-rw-r--r--widgets/account.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/widgets/account.go b/widgets/account.go
index 2f126a3..cf5f1ec 100644
--- a/widgets/account.go
+++ b/widgets/account.go
@@ -249,6 +249,7 @@ func (acct *AccountView) onMessage(msg types.WorkerMessage) {
} else {
store = lib.NewMessageStore(acct.worker, msg.Info,
acct.getSortCriteria(),
+ acct.UiConfig().ThreadingEnabled,
func(msg *models.MessageInfo) {
acct.conf.Triggers.ExecNewEmail(acct.acct,
acct.conf, msg)
@@ -266,6 +267,13 @@ func (acct *AccountView) onMessage(msg types.WorkerMessage) {
}
store.Update(msg)
}
+ case *types.DirectoryThreaded:
+ if store, ok := acct.dirlist.SelectedMsgStore(); ok {
+ if acct.msglist.Store() == nil {
+ acct.msglist.SetStore(store)
+ }
+ store.Update(msg)
+ }
case *types.FullMessage:
if store, ok := acct.dirlist.SelectedMsgStore(); ok {
store.Update(msg)