diff options
author | Jeffas <dev@jeffas.io> | 2019-07-21 22:39:36 +0100 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-07-26 14:15:27 -0400 |
commit | 1b673b5ea7d06ef914e9d48ff7299f8b5f2119fd (patch) | |
tree | 7b6598470500ec2fd923fb6f0939409c25963d79 /widgets/dirlist.go | |
parent | dc4c36adbfbffd34319ddc007bad437ef802ee72 (diff) | |
download | aerc-1b673b5ea7d06ef914e9d48ff7299f8b5f2119fd.tar.gz |
Move msgstore map to dirstore
This map represents a mapping from directory names to their associated messagestores anyway so they should be under dirstore. This simply moves them there and adds some methods required to interact with them.
Diffstat (limited to 'widgets/dirlist.go')
-rw-r--r-- | widgets/dirlist.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/widgets/dirlist.go b/widgets/dirlist.go index 0a6113a..078973a 100644 --- a/widgets/dirlist.go +++ b/widgets/dirlist.go @@ -178,3 +178,15 @@ func (dirlist *DirectoryList) filterDirsByFoldersConfig() { } dirlist.dirs = filtered } + +func (dirlist *DirectoryList) SelectedMsgStore() (*lib.MessageStore, bool) { + return dirlist.store.MessageStore(dirlist.selected) +} + +func (dirlist *DirectoryList) MsgStore(name string) (*lib.MessageStore, bool) { + return dirlist.store.MessageStore(name) +} + +func (dirlist *DirectoryList) SetMsgStore(name string, msgStore *lib.MessageStore) { + dirlist.store.SetMessageStore(name, msgStore) +} |