From bd4df530095ee343778a59120a9e641c01010b0f Mon Sep 17 00:00:00 2001 From: Reto Brunner Date: Sat, 15 Feb 2020 14:14:42 +0100 Subject: Only fetch the directory contents when we are switching directories Previously, sending a DirectoryInfo assumed that a directory change happened. However we don't want that if we only want to update the unread message count. --- widgets/account.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'widgets/account.go') diff --git a/widgets/account.go b/widgets/account.go index f8b6581..a83624f 100644 --- a/widgets/account.go +++ b/widgets/account.go @@ -242,7 +242,6 @@ func (acct *AccountView) onMessage(msg types.WorkerMessage) { store.Update(msg) } else { store = lib.NewMessageStore(acct.worker, msg.Info, - acct.getSortCriteria(), func(msg *models.MessageInfo) { acct.conf.Triggers.ExecNewEmail(acct.acct, acct.conf, msg) @@ -257,6 +256,7 @@ func (acct *AccountView) onMessage(msg types.WorkerMessage) { acct.msglist.SetStore(store) }) } + acct.dirlist.Invalidate() case *types.DirectoryContents: if store, ok := acct.dirlist.SelectedMsgStore(); ok { store.Update(msg) -- cgit v1.2.3