Commit graph

32 commits

Author SHA1 Message Date
Kevin Kuehler
fe2fef4b75 Make :next-result :prev-result relative to cursor
Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
2019-07-25 08:26:43 -04:00
Kevin Kuehler
f81e4bd41c Implement :filter, :clear
Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
2019-07-19 11:30:32 -04:00
Daniel Bridges
06da4512b9 #190 Handle gmail duplicate folder 2019-07-11 19:38:40 -04:00
Drew DeVault
133085b436 Fix re-opening of expired pipe tabs 2019-07-08 18:32:31 -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
Zach Sisco
5b4e592371 panic: runtime error: index out of range in handleFetchMessages (#127) 2019-06-29 14:30:57 -04:00
Drew DeVault
91a75cd98b Implement :search, :next-result, :prev-result 2019-06-26 20:50:54 -04:00
Kevin Kuehler
32f970e053 Move select functionality from msglist to msgstore
Remove msglist Next and Prev commands

Signed-off-by: Kevin Kuehler <kkuehler@brave.com>
2019-06-11 09:34:36 -04:00
Drew DeVault
6271d455eb Add :read and :unread commands 2019-06-09 14:55:42 -04:00
Drew DeVault
05f00f0153 Update our message flags when server updates them 2019-06-09 14:55:04 -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
Drew DeVault
511fea3944 Flesh out multipart switcher 2019-05-20 16:43:08 -04:00
Simon Ser
a15ea01cfb Update internal state and draw from the same goroutine
This commit introduces a new Aerc.Tick function that should be called to
refresh the internal state. This in turn makes each AccountView process worker
events.

The UI goroutine repeatedly refreshes the internal state before drawing a new
frame. The reason for this is that many worker messages may need to be
processed for a single frame, and drawing the UI is far slower than refreshing
the internal state. This has been confirmed in my testing (calling Aerc.Tick
only once per frame results in a slower display).

Many synchronization code has been removed. We can now write widgets without
having to care so much about races. The remaining sync users are:

- widgets/spinner: the spinner value is updated from inside an internal
  goroutine
- lib/ui/invalidatable: Invalidate may be called from any goroutine
- lib/ui/grid: same
- lib/ui/ui: an internal goroutine needs read access to UI.exit
- worker/types/worker: Worker.callbacks is used for both worker and UI
  callbacks

The exact goroutine requirements for Drawable have been documented.
2019-05-19 11:51:16 -04:00
Drew DeVault
98da4c9509 s/aerc2/aerc/g 2019-05-17 20:57:10 -04:00
Drew DeVault
2dafe4b390 Fix issues with OOB uids 2019-05-16 15:28:33 -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
Drew DeVault
d5e82ecfe0 Remove leftover debug logging 2019-05-13 20:24:04 -04:00
Drew DeVault
026e8a17ca Handle incoming emails gracefully 2019-05-13 20:16:55 -04:00
Simon Ser
a275f65848 lib/msgstore: protect with a mutex
MessageStore has a lot of exported fields that can be read from the outside.
Each read must be protected, because a call from Update could happen at any
time.
2019-04-29 09:49:48 -04:00
Drew DeVault
0abafa60e1 Make message viewer real, part two 2019-03-31 12:35:51 -04:00
Drew DeVault
95875b13f8 Rename FetchMessageBodies to FetchFullMessages 2019-03-31 12:19:30 -04:00
Drew DeVault
27b25174e2 Make the message viewer real, part one 2019-03-31 12:14:37 -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
4465646fed Show deleted emails pending server ack in grey
TODO: Don't let the user select or interact with deleted messages
2019-03-30 10:41:12 -04:00
Drew DeVault
77ede6eb5a Add body fetching support code 2019-03-29 22:36:15 -04:00
Drew DeVault
fe79a9a587 Remove unused import from msgstore.go 2019-03-21 16:12:55 -04:00
Drew DeVault
312a53e5ff Implement :delete-message 2019-03-20 23:23:38 -04:00
Drew DeVault
01ae0cef60 Add TODO to msgstore.go 2019-03-15 21:43:33 -04:00
Drew DeVault
ef6178a12a Move MessageStore into its own file 2019-03-15 21:36:06 -04:00