Commit Graph

355 Commits

Author SHA1 Message Date
Manos Pitsidianakis
2b6f6ab42c
melib: Add BackendFolder methods, move special usage logic to backend
- add count() method to return (unseen, total) counts
- add is_subscribed()
- add set_special_usage() and set_is_subscribed()

concerns #8
2019-12-18 08:58:49 +02:00
Manos Pitsidianakis
8f63572584
Small refactors to avoid implicit unwrap() panics 2019-12-15 19:47:42 +02:00
Manos Pitsidianakis
0201241786
melib/backends: MailBackend::refresh() returns Result
Handle cases were refresh() would fail properly. Fixes a crash reported in #13
2019-12-15 08:55:08 +02:00
Manos Pitsidianakis
65efb23f14
melib/MailBackend: add refresh() method
Initiate refresh manually.
2019-12-14 18:58:59 +02:00
Manos Pitsidianakis
d2b4057b7b
melib/MailBackend: add connect() method 2019-12-14 18:58:55 +02:00
Manos Pitsidianakis
2e38ea11e2
melib: make MailBackend::is_online() return Result<()>
Return Result<()> instead of bool to indicate connection status in order
to be able to show errors to user.
2019-12-14 18:57:52 +02:00
Manos Pitsidianakis
2ed9ffb145
melib/jmap: construct session resource url from user settings 2019-12-13 00:36:26 +02:00
Manos Pitsidianakis
da8cd4e85f
Remove jmap from default features 2019-12-13 00:07:06 +02:00
Manos Pitsidianakis
14eb99f515
JMAP WIP #7 2019-12-13 00:04:59 +02:00
Manos Pitsidianakis
d44a453aed
jmap: add keyword->tag support 2019-12-13 00:04:59 +02:00
Manos Pitsidianakis
aa9a6a3128
melib: add SpecialUseMailbox::detect_usage method 2019-12-13 00:04:59 +02:00
Manos Pitsidianakis
30e9114d9c
jmap: fix warnings 2019-12-13 00:04:59 +02:00
Manos Pitsidianakis
275c9f421f
JMAP WIP #6 2019-12-13 00:04:58 +02:00
Manos Pitsidianakis
791033d2fc
melib/jmap: add byte operations 2019-12-13 00:04:58 +02:00
Manos Pitsidianakis
a41dc6c38a
JMAP WIP #5 2019-12-13 00:04:58 +02:00
Manos Pitsidianakis
1ee8ef7a05
JMAP WIP #4 2019-12-13 00:04:58 +02:00
Manos Pitsidianakis
a1efeed343
JMAP WIP #3 2019-12-13 00:04:58 +02:00
Manos Pitsidianakis
e8611cca2f
JMAP WIP #2 2019-12-13 00:04:58 +02:00
Manos Pitsidianakis
a43f6919cc
JMAP WIP 2019-12-13 00:04:58 +02:00
Manos Pitsidianakis
328b17a995
ui/CompactListing: use Segment Trees to calculate max page column width
Given a range of entries that occupy a page (eg [0, 50] for a page of 50
rows high) get the max entry width for this column by using maximum
range queries with segment trees.
2019-12-12 11:11:32 +02:00
Manos Pitsidianakis
d9b568cfb4
melib/envelope: decode other_headers values 2019-12-12 11:00:50 +02:00
Manos Pitsidianakis
7732b851e6
melib: fix minor header parsing errors
- set_subject checked if last byte was control character instead of last
character. Characters can be multi-byte, duh.
- email::parser::date didn't provide for Date values that had -0000
instead of +0000 (that's a chrono requirement/bug)
2019-12-12 00:44:47 +02:00
Manos Pitsidianakis
81c70b0136
melib: small test cosmetic fixes 2019-12-11 16:07:08 +02:00
Manos Pitsidianakis
e79d9aa1c2
melib/parser: parse quote-printable CRLF soft breaks
Check for CRLF soft breaks after checking for LF ones
2019-12-11 15:10:59 +02:00
Manos Pitsidianakis
9fae0f2fa3
melib/imap: prevent minor blocking cases 2019-12-11 01:36:04 +02:00
Manos Pitsidianakis
f05a4205f7
melib/ui: small fixes
- melib/imap: accept quoted strings with escaped quotes in
protocol_parser
- ui/accounts: return unavailabity correctly if folder's worker slot is
empty instead of judging only by its vacancy
- ui/MailView: set view as not dirty if envelope loading from backend
fails so that it stops requesting it in every subsequent redraw
2019-12-11 00:17:11 +02:00
Manos Pitsidianakis
6f76cd9acc
melib: add special_usage() method to BackendFolder
Eventually after loading potential usage values from configuration,
backends will be able to change the usage values themselves. IMAP and
JMAP have the ability to set Mailbox roles (IMAP needs LIST-SPECIAL
extension
2019-12-11 00:15:36 +02:00
Manos Pitsidianakis
bce97d71bb
testing/imap_conn: update imapconn shell use 2019-12-11 00:07:47 +02:00
Manos Pitsidianakis
504b658f68
melib/imap: add UidFetchResponse struct and parser
Add handwritten parser for UID FETCH responses and use it for all UID
FETCH calls.
2019-12-11 00:05:41 +02:00
Manos Pitsidianakis
569127fac5
melib/imap: detect untagged CAPABILITY responses
Gmail sends an untagged CAPABILITY response before accepting login, so
be smarter when logging in
2019-12-11 00:01:22 +02:00
Manos Pitsidianakis
8235af9237
melib/imap: quote mailbox names on SELECT/EXAMINE 2019-12-10 23:56:25 +02:00
Manos Pitsidianakis
a20e08eb43
imap: treat \NoSelect mailboxes as empty
\NoSelect are mailboxes that can't be selected, thus treat them as if
they are empty.
2019-12-10 23:54:19 +02:00
Manos Pitsidianakis
40e928dad3
Push version to 0.4.1 2019-12-08 11:36:38 +02:00
Manos Pitsidianakis
0eaf17871a
melib: add set_tags command in BackendOp 2019-12-08 11:25:54 +02:00
Manos Pitsidianakis
dab9b39f4d
melib/imap: detect tag (\* flag) support 2019-12-07 17:17:08 +02:00
Manos Pitsidianakis
46a807eee1
melib: remove control characters from subject 2019-12-07 01:36:52 +02:00
Manos Pitsidianakis
d048d8566d
ui: add format=flowed if text/plain att is the only one 2019-12-06 16:37:44 +02:00
Manos Pitsidianakis
9d8d3e09f4
melib: remove unused methods from BackendOp 2019-12-06 12:33:58 +02:00
Manos Pitsidianakis
a059e4ad4c
melib: add summary field to MeliError 2019-12-03 13:30:42 +02:00
Manos Pitsidianakis
7010ee7495
melib/mbox: send Finished in Mbox get 2019-12-03 13:30:42 +02:00
Manos Pitsidianakis
ef26b03bb6
Add some documentation 2019-12-01 17:13:36 +02:00
Manos Pitsidianakis
bca33370cc
Add tag settings in UI config module 2019-12-01 12:09:35 +02:00
Manos Pitsidianakis
258b6c8fe8
melib: add tags() method in MailBackend
Add tags() method that returns Option<Arc<RwLock<BTreeMap<u64, String>>>>.

The BTreeMap holds available tags in a mail backend and uses the tag's
hash as key.

The method returns an Option because not all backends may support
tagging.
2019-11-30 17:37:00 +02:00
Manos Pitsidianakis
6653357d54
melib/notmuch: fix compilation errors 2019-11-30 01:12:14 +02:00
Manos Pitsidianakis
bb486ca9d8
melib: Remove quotes from addresses in email/parser.rs 2019-11-28 22:15:32 +02:00
Manos Pitsidianakis
3dfb2f4f2c
melib: fix out-of-bounds parser bug 2019-11-28 18:52:12 +02:00
Manos Pitsidianakis
58209d6f6b
Replace some panics with errors 2019-11-27 17:42:11 +02:00
Manos Pitsidianakis
ba52c59859
bin: add backend specific validation functions for --test-config flag 2019-11-27 17:42:11 +02:00
Manos Pitsidianakis
4677f9c6bb
melib/imap: initialise uid_store folders in folders() 2019-11-27 17:42:11 +02:00
Manos Pitsidianakis
afff63c781
ui: load vcards to addressbook with vcard_folder account setting 2019-11-27 17:42:11 +02:00