diff options
Diffstat (limited to 'worker/imap/open.go')
-rw-r--r-- | worker/imap/open.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/worker/imap/open.go b/worker/imap/open.go index 65060fe5..a0607d00 100644 --- a/worker/imap/open.go +++ b/worker/imap/open.go @@ -61,9 +61,7 @@ func (imapw *IMAPWorker) handleFetchDirectoryContents( }, nil) } else { imapw.worker.Logger.Printf("Found %d UIDs", len(uids)) - if len(imapw.seqMap) < len(uids) { - imapw.seqMap = make([]uint32, len(uids)) - } + imapw.seqMap.Clear() imapw.worker.PostMessage(&types.DirectoryContents{ Message: types.RespondTo(msg), Uids: uids, @@ -113,7 +111,7 @@ func (imapw *IMAPWorker) handleDirectoryThreaded( aercThreads, count := convertThreads(threads, nil) sort.Sort(types.ByUID(aercThreads)) imapw.worker.Logger.Printf("Found %d threaded messages", count) - imapw.seqMap = make([]uint32, count) + imapw.seqMap.Clear() imapw.worker.PostMessage(&types.DirectoryThreaded{ Message: types.RespondTo(msg), Threads: aercThreads, |