From 8cb4a9d751d1497e1059fedb03964bc9e56e5c06 Mon Sep 17 00:00:00 2001 From: Kevin Kuehler Date: Thu, 10 Oct 2019 15:27:07 -0700 Subject: Start adding thread support * Add threading-enabled config option * Add DirectoryThreaded and FetchDirectoryThreaded types to control path * Add generic thread type for all backends to use Signed-off-by: Kevin Kuehler --- widgets/account.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'widgets') diff --git a/widgets/account.go b/widgets/account.go index 4e8dd17..ebc321d 100644 --- a/widgets/account.go +++ b/widgets/account.go @@ -220,6 +220,7 @@ func (acct *AccountView) onMessage(msg types.WorkerMessage) { } else { store = lib.NewMessageStore(acct.worker, msg.Info, acct.getSortCriteria(), + acct.conf.Ui.ThreadingEnabled, func(msg *models.MessageInfo) { acct.conf.Triggers.ExecNewEmail(acct.acct, acct.conf, msg) @@ -238,6 +239,10 @@ func (acct *AccountView) onMessage(msg types.WorkerMessage) { if store, ok := acct.dirlist.SelectedMsgStore(); ok { store.Update(msg) } + case *types.DirectoryThreaded: + if store, ok := acct.dirlist.SelectedMsgStore(); ok { + store.Update(msg) + } case *types.FullMessage: if store, ok := acct.dirlist.SelectedMsgStore(); ok { store.Update(msg) -- cgit v1.2.3