diff options
author | Tim Culverhouse <tim@timculverhouse.com> | 2023-04-16 09:53:44 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-04-22 22:40:12 +0200 |
commit | 5b0a98b8c936532fa5444b1cabf53d7c929d19c1 (patch) | |
tree | b04415f6120d944cd74c45464a771d064cdd4305 /models | |
parent | f13fbe7a27756c63d85f40c15320664d634f59e2 (diff) | |
download | aerc-5b0a98b8c936532fa5444b1cabf53d7c929d19c1.tar.gz |
directory: use directory to store rue counts
Store the Directory RUE counts on the Directory data model. Use
DirectoryInfo messages to update the Directory model. Access Directories
via the dirlist instead of via the msgstore. Remove unused fields on
DirectoryInfo, all backends now give accurate counts.
Move refetch logic into dirlist
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry<robin@jarry.cc>
Diffstat (limited to 'models')
-rw-r--r-- | models/models.go | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/models/models.go b/models/models.go index 5caeb4d3..a47ac24b 100644 --- a/models/models.go +++ b/models/models.go @@ -38,24 +38,22 @@ func (f Flags) Has(flags Flags) bool { type Directory struct { Name string + // Exists messages in the Directory + Exists int + // Recent messages in the Directory + Recent int + // Unseen messages in the Directory + Unseen int } type DirectoryInfo struct { - Name string - Flags []string - ReadOnly bool - + Name string // The total number of messages in this mailbox. Exists int - // The number of messages not seen since the last time the mailbox was opened. Recent int - // The number of unread messages Unseen int - - // set to true if the value counts are accurate - AccurateCounts bool } // Capabilities provides the backend capabilities |