diff options
author | Tim Culverhouse <tim@timculverhouse.com> | 2023-04-16 09:53:39 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-04-22 22:40:12 +0200 |
commit | 2fbb7ce4cbf67538fb7e3416ba0820a22607d452 (patch) | |
tree | 61ee220d1c3425f2bd99c636501899f7a7736291 /lib | |
parent | 87765f93de9b5c123be5beee45b62425c71c2005 (diff) | |
download | aerc-2fbb7ce4cbf67538fb7e3416ba0820a22607d452.tar.gz |
msgstore: create from types.Directory message
Create msgstores when a types.Directory message is received. This
removes a quirk from the IMAP worker that msgstores are created on the
first DirectoryInfo, and updated on the second. This path requires three
messages in order to get an updated message store. By creating from
types.Directory, we ensure that any subsequent DirectoryInfo can be
routed to a msgstore.
Remove the field DirInfo from the msgstore initializer, it isn't needed
at initialization and isn't available with this refactor.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/msgstore.go | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go index 7b86b83c..f81851e2 100644 --- a/lib/msgstore.go +++ b/lib/msgstore.go @@ -75,7 +75,6 @@ type MessageStore struct { const MagicUid = 0xFFFFFFFF func NewMessageStore(worker *types.Worker, - dirInfo *models.DirectoryInfo, defaultSortCriteria []*types.SortCriterion, thread bool, clientThreads bool, clientThreadsDelay time.Duration, reverseOrder bool, reverseThreadOrder bool, sortThreadSiblings bool, @@ -88,7 +87,6 @@ func NewMessageStore(worker *types.Worker, return &MessageStore{ Deleted: make(map[uint32]interface{}), - DirInfo: *dirInfo, Messages: make(map[uint32]*models.MessageInfo), selectedUid: MagicUid, |