diff options
author | Ben Burwell <ben@benburwell.com> | 2019-07-07 22:43:57 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-07-08 16:06:26 -0400 |
commit | 88c379dcbaaf9fd549cd271817e79fe634b1dd84 (patch) | |
tree | 5b12c811aa5a96ebe8debc1cb4067e32ea237698 /worker/imap/imap.go | |
parent | cce7cb48081ca090ac2d3a0e781dfbc25d581946 (diff) | |
download | aerc-88c379dcbaaf9fd549cd271817e79fe634b1dd84.tar.gz |
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.
Diffstat (limited to 'worker/imap/imap.go')
-rw-r--r-- | worker/imap/imap.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/worker/imap/imap.go b/worker/imap/imap.go new file mode 100644 index 00000000..28bac931 --- /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 +} |