statusline: show threading status if threading-enabled=true

Update statusline to display threading status at startup. Previously,
the threading status would only display from a :toggle-threads command.
Users who had the config option threading-enabled would not see the
status, as a result.

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
Tim Culverhouse 2022-07-05 14:48:35 -05:00 committed by Robin Jarry
parent d7feb56cbe
commit 399854c103

View file

@ -311,6 +311,7 @@ func (acct *AccountView) onMessage(msg types.WorkerMessage) {
acct.msglist.SetStore(store) acct.msglist.SetStore(store)
} }
store.Update(msg) store.Update(msg)
acct.SetStatus(statusline.Threading(store.ThreadedView()))
} }
case *types.DirectoryThreaded: case *types.DirectoryThreaded:
if store, ok := acct.dirlist.SelectedMsgStore(); ok { if store, ok := acct.dirlist.SelectedMsgStore(); ok {
@ -318,6 +319,7 @@ func (acct *AccountView) onMessage(msg types.WorkerMessage) {
acct.msglist.SetStore(store) acct.msglist.SetStore(store)
} }
store.Update(msg) store.Update(msg)
acct.SetStatus(statusline.Threading(store.ThreadedView()))
} }
case *types.FullMessage: case *types.FullMessage:
if store, ok := acct.dirlist.SelectedMsgStore(); ok { if store, ok := acct.dirlist.SelectedMsgStore(); ok {