Commit Graph

62 Commits (d8ada69897d46d298309f672df611aa81e3645fa)

Author SHA1 Message Date
Manos Pitsidianakis d8ada69897
compose: don't lose draft if Draft folder isn't available
Try saving in INBOX or another folder instead. On complete failure, save
in /tmp/
2019-09-27 13:40:02 +03:00
Manos Pitsidianakis 26e4d50b40
Try to save sent messages elsewhere if Sent folder fails
If Sent folder wasn't correctly configured, the sent message would be
lost. With this change it tries these folders in this order:

 1. Sent
 2. Inbox
 3. Any other normal folder

The check is done by looking at the special usage metadata on each
folder. If everything fails, the message is saved in a file in the
tmpfs.
2019-09-23 09:30:23 +03:00
Manos Pitsidianakis fe28e849b3
ui: send update event on folders even on no notification
Send an update event even if user's configuration has turned off
notification for this special event. This happens if the entire folder
is set to `ignore`, or when a particular thread is snoozed. In every
case we would want the UI to update.
2019-09-20 09:10:33 +03:00
Manos Pitsidianakis 8795c2da4f
ui: small configuration fixes
- unused options were removed,
- renamed `index` conf option to `index_style`
2019-09-16 16:41:22 +03:00
Manos Pitsidianakis c695d7a8e2
ui: add Notification kinds 2019-09-15 23:38:32 +03:00
Manos Pitsidianakis f394fde143
add priority and info to jobs and workers
jobs now have a priority given to them, in order to parse some mailboxes
(eg INBOX, Sent) first.

worker threads now can set their names and status
2019-09-15 13:21:14 +03:00
Manos Pitsidianakis fd38dbed48
override configuration with per-folder configs 2019-09-15 13:21:14 +03:00
Manos Pitsidianakis 81a55abc7c
Update crossbeam to 0.7.2 and remove chan 2019-09-15 13:21:14 +03:00
Manos Pitsidianakis ecb3fd7f3d
Add dyn keyword to Trait objects
And fix some unused var warnings as well
2019-09-15 13:21:14 +03:00
Manos Pitsidianakis 335a1011de
imap: add watch 2019-09-15 13:21:14 +03:00
Manos Pitsidianakis c3e3c98fb0
melib: filter subscribed folders in MailBackend::new() 2019-09-15 13:21:14 +03:00
Manos Pitsidianakis c9f7b41e47
imap: continuous payload delivery in async workers 2019-09-15 13:21:13 +03:00
Manos Pitsidianakis c2c5f2db69
melib: add Failure to RefreshEventKind 2019-09-15 13:21:13 +03:00
Manos Pitsidianakis 0812242f60
Add IMAP backend
TODOs: new message events (untagged responses)
2019-09-15 13:21:13 +03:00
Manos Pitsidianakis 3f7d962abd
melib: remove ThreadTree, use ThreadNodes for root_set
Remove ThreadTree index in Threads {} struct. Keep a Vec<ThreadHash> for
root_set state of mailbox instead of rebuilding ThreadTrees every
time.
2019-09-08 11:49:23 +03:00
Manos Pitsidianakis dc2184a9de
melib: add Folder operations in mail backends
Add following operations in mail backend:
- Create,
- Delete,
- Subscribe,
- Unsubscribe,
- Rename
2019-09-08 11:15:57 +03:00
Manos Pitsidianakis 8b0dff728d
ui: don't show new mail notifications in ignored folders 2019-09-08 11:13:51 +03:00
Manos Pitsidianakis b474b44b10
Add special use semantics for mailboxes 2019-08-25 10:48:01 +03:00
Manos Pitsidianakis 76909a1959
add folder subscriptions 2019-08-25 10:48:01 +03:00
Manos Pitsidianakis af573b57f1
ui: add nonavailable folder checks 2019-08-15 11:30:25 +03:00
Manos Pitsidianakis bc7da4610e
Send MailboxUpdate events when threads are updated
Depending on the insertion order of folders which is non-deterministic
because it relies on the kernel's scheduling of parsing threads, the
listing the user sees might not be up-to-date because later thread
updates are never broadcast. This results in inconsistencies between
threads and mail listings when a thread's root envelope was part of a
not broadcast update leading to `key not found` panics in a listing's
hashmaps.
2019-08-02 15:17:23 +03:00
Manos Pitsidianakis 8a0e702127
melib,ui: add MailboxEntry enum
Use an enum to describe a mailbox's state in ui::conf::Account instead
of Result.
2019-07-28 20:15:41 +03:00
Manos Pitsidianakis 8543a06f59
ui: rename ignore to subscribe to match IMAP term 2019-07-18 20:26:49 +03:00
Manos Pitsidianakis a62f1d6c01
add read-only option in accounts 2019-07-18 20:16:51 +03:00
Manos Pitsidianakis 93f3d6e230
remove std::dbg uses 2019-07-09 13:05:11 +03:00
Manos Pitsidianakis 74be47ec5a
ui: fix some lints 2019-07-06 12:47:27 +03:00
Manos Pitsidianakis a655a85b5f
ui: fix replies not being synced and inserted properly on RefreshEvents 2019-07-06 12:46:45 +03:00
Manos Pitsidianakis 04fc510ea8
meli: insert new standalone nodes in insert_reply 2019-06-19 19:40:15 +03:00
Manos Pitsidianakis 24831b3c13
Fix warnings, lints, and 2018 errors 2019-06-18 21:14:14 +03:00
Manos Pitsidianakis b6c0236d24
ui: make EnvelopeRename event not folder specific
And pass EnvelopeRename events to subviews
2019-06-10 19:40:51 +03:00
Manos Pitsidianakis c6674a294d
melib: unwrap mailbox module 2019-06-10 19:40:50 +03:00
Manos Pitsidianakis 6f7b3f20de
move StackVec to melib
closes #120
2019-06-10 19:40:50 +03:00
Manos Pitsidianakis 42654410e3
ui: move Collection to Account
Each account had one mailbox per folder, which had one associated
collection. Now each Account has one Collection for all folders and each
Mailbox object holds only the hashes of each message.

Collection also gets Threads for each folder in order to mix messages
(ie from/to Sent folder).

Insert Sent emails in chronological order

if inserted unsorted, mails a, b with a happened-before b, might never
  get added.

Fix multiple insertions in ThreadTree upon insert_reply

insert_reply was creating multiple copies in threading
2019-06-10 19:40:50 +03:00
Manos Pitsidianakis 51c913d450
ui: add event queue for folders in Account 2019-06-10 19:40:49 +03:00
Manos Pitsidianakis 3c575c823d
ui: toggle thread snooze flag
snooze field translated to whether the user wants to be notified of new
email in the thread or not. This is toggled with an (temp) EX cmd: `toggle_thread_snooze`

closes #112
2019-06-10 19:40:49 +03:00
Manos Pitsidianakis 22d868f499
save Account to disk
closes #114
2019-06-10 19:40:49 +03:00
Manos Pitsidianakis 4582bcd5ae
fix warnings and lints 2019-06-10 19:40:49 +03:00
Manos Pitsidianakis de81fd1a68
ui: don't show notifications if folder is ignore
Also ignore Sent folder by default
2019-06-10 19:40:49 +03:00
Manos Pitsidianakis c26dd0685b
ui: print menu entries in order
FolderNode is a tree structure to represent the sorted or user defined
order inside the Account type
2019-06-10 19:40:47 +03:00
Manos Pitsidianakis fb406667ab
add debug! macro to replace eprintlns 2019-06-10 19:40:46 +03:00
Manos Pitsidianakis 3415a382a1
ui: make StackVec return an Option<T> 2019-06-10 19:40:46 +03:00
Manos Pitsidianakis 1e44089d84
ui: Refer to child/parents with FolderHash in BackendFolder
- use a stack to build folder order list in conf/accounts.rs
- update side menu print
2019-06-10 19:40:45 +03:00
Manos Pitsidianakis 87adc6dd19
melib/ui: refer to Folders by FolderHash 2019-06-10 19:40:44 +03:00
Manos Pitsidianakis 04eb8d926f
ui: remove debug_log feature, add log positions 2019-06-10 19:40:44 +03:00
Manos Pitsidianakis 9bc76e3bcb
ui: unwrap UIEventType 2019-06-10 19:40:44 +03:00
Manos Pitsidianakis b993375fa0
ui: put INBOX first in AccountMenu 2019-06-10 19:40:44 +03:00
Manos Pitsidianakis 42a512d010
ui: save sent messages to Sent folder 2019-06-10 19:40:44 +03:00
Manos Pitsidianakis 0e2e8b09f6
ui: update accounts tab on mailboxupdate 2019-06-10 19:40:44 +03:00
Manos Pitsidianakis ee4462881e
run cargo fmt 2019-06-10 19:40:42 +03:00
Manos Pitsidianakis 1c7aa0ec9c
update to 2018 edition 2019-06-10 19:40:42 +03:00