Commit Graph

9 Commits (7463248da88523d80783a5e43ef7fcf071fde3f4)

Author SHA1 Message Date
Manos Pitsidianakis 7463248da8
melib: change BackendOp::set_flag() signature 2019-11-15 21:32:55 +02:00
Manos Pitsidianakis 78eecbb104
melib: Hide Envelope behind RwLock
Envelope can now only be accessed from within a RwLock. Two new structs
are introduced: EnvelopeRef and EnvelopeRefMut. These hold a reference
to an Envelope and the mutex guard that keeps them alive.

This change allows sharing of the envelopes hash map amongst threads.
2019-11-08 15:13:41 +02:00
Manos Pitsidianakis 817c338a13
melib: fix metadata updates in Envelope updates 2019-09-15 23:38:31 +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 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 a655a85b5f
ui: fix replies not being synced and inserted properly on RefreshEvents 2019-07-06 12:46:45 +03:00
Manos Pitsidianakis 24831b3c13
Fix warnings, lints, and 2018 errors 2019-06-18 21:14:14 +03:00
Manos Pitsidianakis c6674a294d
melib: unwrap mailbox module 2019-06-10 19:40:50 +03:00