~sircmpwn/aerc

4b350dddea99faad7450f292b6be036a0fe3220d — Drew DeVault 2 years ago 2750f99
Add name to DirectoryInfo messages
2 files changed, 4 insertions(+), 2 deletions(-)

M worker/imap/worker.go
M worker/types/messages.go
M worker/imap/worker.go => worker/imap/worker.go +2 -1
@@ 163,8 163,9 @@ func (w *IMAPWorker) handleImapUpdate(update client.Update) {
	case *client.MailboxUpdate:
		status := update.Mailbox
		w.worker.PostMessage(&types.DirectoryInfo{
			ReadOnly: status.ReadOnly,
			Flags:    status.Flags,
			Name:     status.Name,
			ReadOnly: status.ReadOnly,

			Exists: int(status.Messages),
			Recent: int(status.Recent),

M worker/types/messages.go => worker/types/messages.go +2 -1
@@ 83,8 83,9 @@ type Directory struct {

type DirectoryInfo struct {
	Message
	ReadOnly bool
	Flags    []string
	Name     string
	ReadOnly bool

	Exists, Recent, Unseen int
}