From 1b673b5ea7d06ef914e9d48ff7299f8b5f2119fd Mon Sep 17 00:00:00 2001 From: Jeffas Date: Sun, 21 Jul 2019 22:39:36 +0100 Subject: 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. --- widgets/dirlist.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'widgets/dirlist.go') 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) +} -- cgit v1.2.3