Commit graph

43 commits

Author SHA1 Message Date
Galen Abell
6ff3c7a1ba Mark sent messages as "seen" in maildir
- Add maildir flags to complement a messages imap flags
- Set the "seen" flag on sent messages when using the maildir backend
- Cleanup AppendMessage interface to use models.Flag for both IMAP and
  maildir
2020-03-03 20:08:37 +01:00
Reto Brunner
f3dbecaaea remove the dirInfoUpdateRequest functionality
The notmuch worker followed suit in handling the dirInfo submission manually.
That removes the last user so we might as well remove the functionality.
2020-02-29 13:16:33 -05:00
Reto Brunner
89b742dc6c Request DirInfo whenever the unread count may have changed
Actions such as read / unread or the addition of new messages do change
the read/unread/recent count. Hence we request an update from the workers.
Workers going over the network should probably cache the information and invalidate
it only if necessary
2020-02-16 10:41:17 -05:00
Reto Brunner
9096049f75 FetchBodyParts: decode source in the workers
Previously the workers returned a mixture of decoded / encoded parts.
This lead to a whole bunch of issues.
This commit changes the msgviewer and the commands to assume parts to already
be decoded
2020-01-05 16:02:45 -05:00
Reto Brunner
2705d8460d add LabelList event 2019-12-21 11:20:11 -05:00
Jeffas
90d26da58a Add sorting functionality
There is a command and config option. The criteria are a list of the
sort criterion and each can be individually reversed.

This only includes support for sorting in the maildir backend currently.
The other backends are not supported in this patch.
2019-09-20 14:56:02 -04:00
Reto Brunner
a93b4de6f3 Add modify-labels command
This adds the event type as well as the command implementation, but no backend
supports it yet.
2019-09-12 16:17:24 -04:00
Reto Brunner
94b9d557de extract search criteria parsing into the backends 2019-08-29 08:44:10 +09:00
Daniel Bridges
06da4512b9 #190 Handle gmail duplicate folder 2019-07-11 19:38:40 -04:00
Ben Burwell
88c379dcba 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.
2019-07-08 16:06:26 -04:00
Ben Burwell
cce7cb4808 Factor UI models out of the worker message package
Before, the information needed to display different parts of the UI was
tightly coupled to the specific messages being sent back and forth to
the backend worker. Separating out a models package allows us to be more
specific about exactly what a backend is able to and required to
provide for the UI.
2019-07-08 16:06:23 -04:00
Drew DeVault
0e9c411751 worker/imap: implement search 2019-06-24 16:29:25 -04:00
Drew DeVault
6271d455eb Add :read and :unread commands 2019-06-09 14:55:42 -04:00
Robert Günzler
acfe7d7625 Add archive command
Adds an archive command that moves the current message into the folder
specified in the account config entry.

Supports three layouts at this point:

- flat: puts all messages next to each other
- year: creates a folder per year
- month: same as above, plus folders per month

This also adds a "-p" argument to "cp" and "mv" that works like
"--parents" on mkdir(1). We use this to auto-create the directories
for the archive layout.
2019-06-09 11:33:50 -04:00
Yash Srivastav
b83e7c9fa6 implements ability to view headers in message view 2019-06-07 09:20:24 -04:00
Drew DeVault
a81467dda9 Remove worker callbacks when Done is received 2019-06-02 13:20:02 -04:00
Drew DeVault
511fea3944 Flesh out multipart switcher 2019-05-20 16:43:08 -04:00
Drew DeVault
5de1bb8cc3 Verify TLS certificates
I was partway done implementing a UI for users to approve untrusted
certs with, but let's just make them configure their servers right
instead.
2019-05-20 14:03:00 -04:00
Simon Ser
248345d875 worker/types/worker: remove mutex
Worker.callbacks contains two types of callbacks: some are action callbacks,
some are message callbacks. Each of those is access from one side of the
communication channel (UI goroutine vs. worker goroutine).

Instead of using a channel, we can use two different maps for each kind. This
simplifies the code and also ensures we don't call an action callback instead
of a message callback (or the other way around).
2019-05-19 11:51:25 -04:00
Simon Ser
f27db33305 worker/types/worker: make ID allocation atomic
Message IDs are allocated for both messages from UI to workers and the other
way around. Hence, the global nextId variable is accessed from multiple
goroutines.

Instead, use atomic to access the global counter.
2019-05-19 11:51:22 -04:00
Simon Ser
34dd6bc635 worker/types/worker: set ID before sending message
The previous code set the message ID after sending it, which could result in
the receiver reading the ID before it's set.
2019-05-19 11:51:20 -04:00
Drew DeVault
98da4c9509 s/aerc2/aerc/g 2019-05-17 20:57:10 -04:00
Drew DeVault
b0bf09b98f Copy sent emails to the Sent folder
Or rather, to a user-specified folder
2019-05-15 19:41:21 -04:00
Drew DeVault
2e5ae1946b Implement move, mv commands 2019-05-14 16:55:50 -04:00
Drew DeVault
db213fd0ae Implement :copy (aka :cp) 2019-05-14 16:44:59 -04:00
Simon Ser
9ef2a57b51 worker/types: fix Worker.Callbacks race condition
Worker.Process* functions were called in different goroutines than
Worker.Post*. Protect the map with a mutex. Also make the map unexported to
prevent external unprotected accesses.

Worker.Process* functions used to delete items from the map. However they
didn't delete the element they retrieved: callbacks[msg.InResponseTo()] was
read while callbacks[msg] was deleted. I'm not sure I understand why. I tried
to delete the element that was accessed - but this broke everything (UI froze
at "Connecting..."). I don't believe any elements were actually removed from
the map, so the new code just doesn't remove anything.
2019-04-27 14:28:26 -04:00
Drew DeVault
95875b13f8 Rename FetchMessageBodies to FetchFullMessages 2019-03-31 12:19:30 -04:00
Drew DeVault
143289bbd0 Don't parse mail in worker; send a reader instead 2019-03-31 11:29:57 -04:00
Drew DeVault
1f23868652 Pull BodyStructure up from IMAP worker 2019-03-31 11:10:10 -04:00
Drew DeVault
77ede6eb5a Add body fetching support code 2019-03-29 22:36:15 -04:00
Drew DeVault
312a53e5ff Implement :delete-message 2019-03-20 23:23:38 -04:00
Drew DeVault
11f0a7267f Implement message store side of message fetching 2019-03-14 21:51:29 -04:00
Drew DeVault
b3896476a0 Fetch valid UIDs from server after opening dir 2019-03-10 23:45:00 -04:00
Drew DeVault
4b350dddea Add name to DirectoryInfo messages 2019-01-13 19:37:06 -05:00
Drew DeVault
2750f99a60 Issue IMAP SELECT command 2019-01-13 16:18:10 -05:00
Drew DeVault
d603bbe2ce Refactoring; consume listing response 2018-02-01 19:54:19 -05:00
Drew DeVault
cc03f6f4c8 Implement (most of) mailbox listing 2018-02-01 19:34:08 -05:00
Drew DeVault
1767e4fab5 Improve logging 2018-02-01 18:59:13 -05:00
Drew DeVault
d24e4712a4 Reduce boilerplate in worker/UI 2018-02-01 18:42:03 -05:00
Drew DeVault
3139148c7b Add certificate approval flow 2018-01-31 21:54:52 -05:00
emersion
1710c90548 Connect to IMAP server, login and idle 2018-01-14 10:26:38 -05:00
Drew DeVault
4074445cbb Move worker into account tab 2018-01-11 09:04:18 -05:00
Drew DeVault
6394e386c2 Initial pass on worker/UI message passing 2018-01-09 20:39:00 -05:00