From ef6178a12ae5ef7070711f5cc2f2114dfd015dcd Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 15 Mar 2019 21:36:06 -0400 Subject: Move MessageStore into its own file --- widgets/account.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'widgets/account.go') diff --git a/widgets/account.go b/widgets/account.go index 8716b11..6919c0e 100644 --- a/widgets/account.go +++ b/widgets/account.go @@ -8,6 +8,7 @@ import ( "github.com/gdamore/tcell" "git.sr.ht/~sircmpwn/aerc2/config" + "git.sr.ht/~sircmpwn/aerc2/lib" "git.sr.ht/~sircmpwn/aerc2/lib/ui" "git.sr.ht/~sircmpwn/aerc2/worker" "git.sr.ht/~sircmpwn/aerc2/worker/types" @@ -23,7 +24,7 @@ type AccountView struct { onInvalidate func(d ui.Drawable) runCmd func(cmd string) error msglist *MessageList - msgStores map[string]*MessageStore + msgStores map[string]*lib.MessageStore pendingKeys []config.KeyStroke statusline *StatusLine statusbar *ui.Stack @@ -70,7 +71,7 @@ func NewAccountView(conf *config.AercConfig, acct *config.AccountConfig, grid: grid, logger: logger, msglist: msglist, - msgStores: make(map[string]*MessageStore), + msgStores: make(map[string]*lib.MessageStore), runCmd: runCmd, statusbar: statusbar, statusline: statusline, @@ -226,7 +227,7 @@ func (acct *AccountView) onMessage(msg types.WorkerMessage) { if store, ok := acct.msgStores[msg.Name]; ok { store.Update(msg) } else { - acct.msgStores[msg.Name] = NewMessageStore(acct.worker, msg) + acct.msgStores[msg.Name] = lib.NewMessageStore(acct.worker, msg) } case *types.DirectoryContents: store := acct.msgStores[acct.dirlist.selected] -- cgit v1.2.3