diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-03-15 21:36:06 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-03-15 21:36:06 -0400 |
commit | ef6178a12ae5ef7070711f5cc2f2114dfd015dcd (patch) | |
tree | 6bfba867c30bfc5ac0188aa66d4263789b1199e3 /widgets/account.go | |
parent | 77c76ba46296f57f88c591a420e929a059a55d3e (diff) | |
download | aerc-ef6178a12ae5ef7070711f5cc2f2114dfd015dcd.tar.gz |
Move MessageStore into its own file
Diffstat (limited to 'widgets/account.go')
-rw-r--r-- | widgets/account.go | 7 |
1 files changed, 4 insertions, 3 deletions
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] |