Commit Graph

69 Commits (eaecc5ea12f4a5ebe309d5654509c0771bbdc2f1)

Author SHA1 Message Date
Manos Pitsidianakis b5b9982d9e
notmuch: cache messages by msg-id, not path 4 years ago
Manos Pitsidianakis 2230e5705d
notmuch: LOCK database only when needed
Reported in https://git.meli.delivery/meli/meli/issues/24
4 years ago
Manos Pitsidianakis 61be6e4c96
notmuch: fix wrong mailbox path in save()
mailbox path was passed to save_to_mailbox() with a cur/ tail and
save_to_mailbox() added an extra cur/ tail
4 years ago
Manos Pitsidianakis 303c530488
Load libnotmuch dynamically 4 years ago
Manos Pitsidianakis 4ac52d9d5b
Replace every use of Folder with Mailbox
Use Mailbox for consistency.
4 years ago
Manos Pitsidianakis a365a846b8
Replace StackVec with smallvec::SmallVec
SmallVec has a less buggy and better implementation.
4 years ago
Manos Pitsidianakis 3d84f3b9ad
notmuch: remove needless clones 4 years ago
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
5 years ago
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.
5 years ago
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
5 years ago
Manos Pitsidianakis 0eaf17871a
melib: add set_tags command in BackendOp 5 years ago
Manos Pitsidianakis 9d8d3e09f4
melib: remove unused methods from BackendOp 5 years ago
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.
5 years ago
Manos Pitsidianakis 6653357d54
melib/notmuch: fix compilation errors 5 years ago
Manos Pitsidianakis 58209d6f6b
Replace some panics with errors 5 years ago
Manos Pitsidianakis ba52c59859
bin: add backend specific validation functions for --test-config flag 5 years ago
Manos Pitsidianakis 41a678c6ef
melib: make MailBackend::folders return Result
Change folders() signature:
-    fn folders(&self) -> FnvHashMap<FolderHash, Folder>;
+    fn folders(&self) -> Result<FnvHashMap<FolderHash, Folder>>;

Imap may not be online, therefore we need the ability to return an
error.
5 years ago
Manos Pitsidianakis 321be8555f
Cleanup startup error exit paths
Make startup methods return Results so that the main binary can exit
cleanly instead of using std::process::exit from arbitrary positions,
which exits the process immediately and doesn't run destructors.
5 years ago
Manos Pitsidianakis 77936e0cd5
melib: add notmuch backend
Missing:
- Watching for updates functionality
- Using tags
- Search
5 years ago