Commit Graph

1239 Commits

Author SHA1 Message Date
Manos Pitsidianakis
7bbfd188ef
melib/imap: move current_mailbox to ImapStream
ImapStream holds the connection state (current command id), so it makes
sense to move current_mailbox state there. That way, when a connection
drops for whatever reason the old current_mailbox is dropped and not
carried over to new connections.
2020-07-27 15:06:56 +03:00
Manos Pitsidianakis
2db983ae1f
mail/view.rs: try restarting future if get bytes fails 2020-07-27 15:06:56 +03:00
Manos Pitsidianakis
ce693904bf
samples/themes: add orca theme 2020-07-27 15:06:56 +03:00
Manos Pitsidianakis
32b4c30fee
melib/email.rs: use SmallVec for Address fields 2020-07-27 15:06:56 +03:00
Manos Pitsidianakis
52cec59215
melib/error: add From<&MeliError> for MeliError 2020-07-27 15:04:29 +03:00
Manos Pitsidianakis
3152411f22
Fix Makefile semantics
Makefile targets didn't correspond to the widely used ones:

- make should build meli instead of showing help
- make check should run tests

Closes #42
2020-07-26 16:09:41 +03:00
Manos Pitsidianakis
70a4409e59
mail/listing*: various theme color fixes 2020-07-26 16:09:41 +03:00
Manos Pitsidianakis
74673880e6
command.rs: add eof() parser to action parsers 2020-07-26 16:09:41 +03:00
Manos Pitsidianakis
cc119c19b0
melib/maildir: send NewFlags events 2020-07-26 16:09:41 +03:00
Manos Pitsidianakis
031e81ac8f
imap: add UntaggedResponse::UIDFetch 2020-07-26 16:09:41 +03:00
Manos Pitsidianakis
f41a1ffe3a
imap: remove FLAGS.SILENT from STOREs
Flag updates were not received, because FLAGS.SILENT was used.
2020-07-26 16:09:41 +03:00
Manos Pitsidianakis
26b327d86a
mail/listing*: clear selection after perform_action() 2020-07-26 16:09:41 +03:00
Manos Pitsidianakis
b5530860d2
conf/DotAddressable: impls for more types 2020-07-26 16:09:35 +03:00
Manos Pitsidianakis
0d198dbb56
conf.rs: fix struct decl/impl order in file
Impls and type declarations were out of order
2020-07-26 15:38:11 +03:00
Manos Pitsidianakis
7fd511e149
conf/shortcuts.rs: implement DotAddressable for Shortcuts 2020-07-26 15:38:11 +03:00
Manos Pitsidianakis
1cc1b0604c
conf/accounts.rs: use QueryTrait when search_backend is None 2020-07-26 15:38:08 +03:00
Manos Pitsidianakis
3f8aa560f0
melib/MailBackend: add MailBackendCapabilities struct 2020-07-25 17:53:04 +03:00
Manos Pitsidianakis
4aaa784d8f
Fix panic on empty command history when browsing history 2020-07-25 16:34:53 +03:00
Manos Pitsidianakis
8b90c7fcb6
conf/shortcuts: add shortcut for COMMAND mode
Replace hardcoded Key value with customisable shortcut
"general.enter_command_mode"
2020-07-25 15:19:53 +03:00
Manos Pitsidianakis
c2550f60b6
Rename EXECUTE mode to COMMAND
vim uses COMMAND, and we want to be consistent with vim when possible.
2020-07-25 15:19:53 +03:00
Manos Pitsidianakis
b20bdea8f0
EXECUTE: cancel command with Esc 2020-07-25 15:19:53 +03:00
Manos Pitsidianakis
989cfcc877
conf/accounts.rs: use mailbox alias if available in MailboxEntry::name() 2020-07-25 15:19:53 +03:00
Manos Pitsidianakis
7744ef1462
conf/accounts.rs: make JobRequest::Generic name Cow<'_, str> 2020-07-25 15:19:53 +03:00
Manos Pitsidianakis
d6ef3567f4
conf/accounts.rs: add hash() method 2020-07-25 15:19:53 +03:00
Manos Pitsidianakis
688060ceb6
conf/accounts.rs: always load Inbox 2020-07-25 15:19:53 +03:00
Manos Pitsidianakis
ed3b2fa6c8
types.rs: add JobCanceled event 2020-07-25 15:19:53 +03:00
Manos Pitsidianakis
5a5408ecd5
imap: small fixes 2020-07-25 15:19:53 +03:00
Manos Pitsidianakis
00acba7717
melib/MailBackend: add copy_messages,set_flags,delete_messages methods 2020-07-25 15:19:53 +03:00
Manos Pitsidianakis
a049a83fe3
conf/accounts: add insert_job() method 2020-07-25 15:19:53 +03:00
Manos Pitsidianakis
246ac4b84a
Update smallvec dependency to 1.4.1 2020-07-25 15:19:52 +03:00
Manos Pitsidianakis
1b8529c59c
melib/imap: use LITERAL+ with APPEND
Closes #50
2020-07-25 15:17:35 +03:00
Manos Pitsidianakis
f9efaea0ec
ConversationsListing: fix invalid update_line colors 2020-07-25 15:17:35 +03:00
Manos Pitsidianakis
99fbac3806
Remove unused variables/functions 2020-07-23 13:39:58 +03:00
Manos Pitsidianakis
0ee3a0bf79
imap: clear mesage totals when fetching entire mailbox
Totals might have been set after a STATUS response, meaning we know the
totals without knowing exactly what message UIDs are there. Clear the
totals, and start inserting UIDs instead.
2020-07-23 13:23:24 +03:00
Manos Pitsidianakis
6121f77853
imap: support LIST-STATUS 2020-07-23 13:23:24 +03:00
Manos Pitsidianakis
350c8033b1
imap: use ImapLineIterator in imap_mailboxes() 2020-07-23 13:23:23 +03:00
Manos Pitsidianakis
e49c293b01
imap: impl DoubleEndedIterator for ImapLineIterator 2020-07-23 13:23:23 +03:00
Manos Pitsidianakis
b9343dfb32
imap: update supported capabilities 2020-07-23 13:23:23 +03:00
Manos Pitsidianakis
1bd89b3c96
themes: add mail.sidebar_account_name key 2020-07-23 13:23:23 +03:00
Manos Pitsidianakis
44ffbe54e2
input_thread: add atomic refcount to check if thread is dead 2020-07-23 13:23:23 +03:00
Manos Pitsidianakis
0882dbbad0
melib/Collection: put all fields behind a mutex 2020-07-23 13:23:23 +03:00
Manos Pitsidianakis
1112ef4717
melib/Collection: remove unused fields 2020-07-23 13:23:23 +03:00
Manos Pitsidianakis
fadb3634e0
melib: take MailboxHash instead of &Mailbox in fetch*() 2020-07-23 13:23:23 +03:00
Manos Pitsidianakis
9103d05617
melib: s/get/fetch in MailBackend methods 2020-07-18 12:34:13 +03:00
Manos Pitsidianakis
0a7f283582
imap: prevent deadlock in watch::examine_updates
uid_store.mailboxes was locked before calling examine_updates, which
calls examine_mailbox() which also attempts to lock uid_store.mailboxes
2020-07-17 22:45:25 +03:00
Manos Pitsidianakis
996abd323f
Add print setting action
Add experimental print setting action. The command is of the form:

  print account_name listing.index_style

account_name is currently ignored.

The path, e.g. listing.index_style is split by "." and fed to
DotAddressable lookup trait method. The method checks the first segment
in the path if it matches any of the struct's fields, and then calls the
field's lookup method.
2020-07-17 13:33:40 +03:00
Manos Pitsidianakis
c6c2865a54
melib/thread/iterators: remove recursion in favor of loops 2020-07-17 13:33:40 +03:00
Manos Pitsidianakis
b4dadf20b6
ThreadListing: don't print previous link on root envelopes
If a thread root is missing (i.e. we never received that message or it
was deleted) threads rendered like this:

 ├─>Re: original subject
 ├─>Re: original subject
 └─>Re: original subject

This causes visual ambiguity if the parentless thread follows another:

 Another thread
 └─>Re: Another thread
 ├─>Re: original subject
 ├─>Re: original subject
 └─>Re: original subject

This commit removes the "previous link" from every first message in a group:

 ┬─>Re: original subject
 ├─>Re: original subject
 └─>Re: original subject
2020-07-17 13:33:40 +03:00
Manos Pitsidianakis
08d8c05a67
CompactListing: update self.rows{,_drawn} on row update
self.rows{,_drawn} were left unupdated, and stale envelope hashes could
result in panics
2020-07-17 00:04:59 +03:00
Manos Pitsidianakis
1bac926bdc
CompactListing: add row_attr macro
Add macro to calculate theme attribute for given thread row
2020-07-17 00:04:26 +03:00