From dccdea1e026edc2bc9c5dc27604e85ce333d65bc Mon Sep 17 00:00:00 2001 From: Ben Burwell Date: Wed, 3 Jul 2019 18:11:33 -0400 Subject: Use []uint32 instead of imap.SeqSet A sequence-set is an IMAP-specific implementation detail. Throughout the UI, aerc simply operates using lists of opaque identifiers. In order to loosen the coupling between the UI and IMAP in particular, replace most usages of imap.SeqSet with []uint32, leaving the translation to a SeqSet to the IMAP backend as needed. --- worker/imap/imap.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 worker/imap/imap.go (limited to 'worker/imap/imap.go') diff --git a/worker/imap/imap.go b/worker/imap/imap.go new file mode 100644 index 0000000..28bac93 --- /dev/null +++ b/worker/imap/imap.go @@ -0,0 +1,13 @@ +package imap + +import ( + "github.com/emersion/go-imap" +) + +func toSeqSet(uids []uint32) *imap.SeqSet { + var set imap.SeqSet + for _, uid := range uids { + set.AddNum(uid) + } + return &set +} -- cgit v1.2.3