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.
- 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)
- 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
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
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.
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.
- Parse List-Post value like List-Unsubscribe: comma separated angle bracket limited list of <mailto:> or <url> values
- Check if List-Archive value is angle bracket delimited
fetch BODYSTRUCTURE along with ENVELOPE from server and set
has_attachments based on the MIME structure of the envelope.
Notes: BODYSTRUCTURE returns the MIME structure of the envelope without
the data, so if it includes a multipart/mixed it *should* have
attachments.
ENVELOPE returns basic headers of the message like Sender, Subject, Date
etc.
thread_group property of ThreadNode doesn't yet reflect the actual root
ThreadNode (the root of the thread, that is). So find the root manually
instead.
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.
Previous behaviour: connection with IDLE was stopped every 5 minutes to
poll the other threads. As a result messages received within that time
window when there was no IDLING were never received.
Current behaviour: polling is done in the main connection.
The operation() method on the MailBackend trait returns a trait object
that can read or modify an Envelope directly from the backend. This is
used to get eg the envelope's text, or set flags. It has two arguments,
envelope hash and folder hash.
Only the Maildir backend needed the latter argument, and it can be replaced with a dictionary to match envelope hashes to folder hashes within the Maildir backend.
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.
Add a boolean field to accounts that states if the account can be
accessed. Local backends (Maildir/mbox) return true every time, but
remote backends (IMAP) may not. Accounts start as offline and then get
initialised when their status goes to online. Right now if an IMAP
account startup but later get offline, there are crashes. With this
change the account can be switched back to offline when that happens.
Adds support for contacts (Cards) marked as `external_resource` which
prevents modifications from happening. No way to import external
contacts is added yet.
CardId is the "Primary Key" of the contact type, Card. Meli-created
contacts had UUIDs for their CardId. In order to import external
contacts and ensure their primary key is the same each time, CardId is
made into an enum to add hashing as a choice.