summary refs log tree commit diff stats
path: root/widgets/dirlist.go
diff options
context:
space:
mode:
authorJeffas <dev@jeffas.io>2019-07-21 22:39:36 +0100
committerDrew DeVault <sir@cmpwn.com>2019-07-26 14:15:27 -0400
commit1b673b5ea7d06ef914e9d48ff7299f8b5f2119fd (patch)
tree7b6598470500ec2fd923fb6f0939409c25963d79 /widgets/dirlist.go
parentdc4c36adbfbffd34319ddc007bad437ef802ee72 (diff)
downloadaerc-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.go12
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)
+}