init: pristine aerc 0.20.0 source

This commit is contained in:
Mortdecai
2026-04-07 19:54:54 -04:00
commit 083402a548
502 changed files with 68722 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
package cache
import (
"git.sr.ht/~rockorager/go-jmap"
)
type IDList struct {
IDs []jmap.ID
}
func (c *JMAPCache) GetMailboxList() ([]jmap.ID, error) {
buf, err := c.get(mailboxListKey)
if err != nil {
return nil, err
}
var list IDList
err = unmarshal(buf, &list)
if err != nil {
return nil, err
}
return list.IDs, nil
}
func (c *JMAPCache) PutMailboxList(list []jmap.ID) error {
buf, err := marshal(&IDList{IDs: list})
if err != nil {
return err
}
return c.put(mailboxListKey, buf)
}
const mailboxListKey = "mailbox/list"