diff options
author | Tim Culverhouse <tim@timculverhouse.com> | 2023-04-16 09:53:38 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-04-22 22:40:12 +0200 |
commit | 87765f93de9b5c123be5beee45b62425c71c2005 (patch) | |
tree | 0c9401dc48b48d4592900109d592befc5c624f21 /worker/mbox/worker.go | |
parent | 82de08a8a3f55c438d8808e3c759e3d99261c4b8 (diff) | |
download | aerc-87765f93de9b5c123be5beee45b62425c71c2005.tar.gz |
capabilities: report capabilities from backend
Use the Backend interface to report Backend capabilities. Previously,
these were reported via a DirectoryInfo message, however they have
nothing to do with a directory and should be reported directly by the
backend. Add Capabilities method to Backend interface, satisfy this in
each backend, and use it on the UI side.
Remove Caps field from DirectoryInfo
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry<robin@jarry.cc>
Diffstat (limited to 'worker/mbox/worker.go')
-rw-r--r-- | worker/mbox/worker.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/worker/mbox/worker.go b/worker/mbox/worker.go index c2cf9ecb..3063640a 100644 --- a/worker/mbox/worker.go +++ b/worker/mbox/worker.go @@ -28,11 +28,17 @@ type mboxWorker struct { name string folder *container worker *types.Worker + + capabilities *models.Capabilities } func NewWorker(worker *types.Worker) (types.Backend, error) { return &mboxWorker{ worker: worker, + capabilities: &models.Capabilities{ + Sort: true, + Thread: false, + }, }, nil } @@ -373,6 +379,10 @@ func (w *mboxWorker) Run() { } } +func (w *mboxWorker) Capabilities() *models.Capabilities { + return w.capabilities +} + func filterUids(folder *container, uids []uint32, args []string) ([]uint32, error) { criteria, err := lib.GetSearchCriteria(args) if err != nil { |