Commit Graph

27 Commits (05b91f1c02a273c653a73569493f8e7154a62a11)

Author SHA1 Message Date
Manos Pitsidianakis 05b91f1c02
Remove text_processing
Unwrap text_processing into melib

In preparation for uploading meli as a separate crate on crates.io.
2020-02-04 17:29:55 +02:00
Manos Pitsidianakis 5dc477bcd5
Fix some unused etc warnings 2020-01-27 17:32:12 +02:00
Manos Pitsidianakis 254028fa47
melib/threads: fix thread splintering case when inserting reply
When inserting reply, its thread group was re-inserted with the reply as
the root. This is a mistake as threads should never be re-inserted, only
modified.
2020-01-27 14:34:25 +02:00
Manos Pitsidianakis e07b5faf6e
melib/threads: already-exists check in threads insert 2020-01-20 16:03:29 +02:00
Manos Pitsidianakis 350fafb515
melib/thread: add attachments field to Thread 2020-01-20 16:03:06 +02:00
Manos Pitsidianakis 5e68d600b9
melib/threads: Split ThreadGroup::Group to Thread
Create Thread struct.
2020-01-20 16:03:06 +02:00
Manos Pitsidianakis d9269335a1
melib/threads: rename thread hashes
- Rename ThreadHash to ThreadNodeHash
- Rename ThreadGroupHash to ThreadHash
2020-01-20 16:03:06 +02:00
Manos Pitsidianakis 47a69f8eb9
melib: add ThreadGroup
Instead of using Union/Find to gather mail that belongs in the same
e-mail thread together, add a new entity ThreadGroup that ThreadNodes
point to. ThreadGroup represents an actual Thread: A thread root
ThreadGroup::Group or a reply ThreadGroup::Node.

To make semantics more accurate:

- ThreadNode hash should be renamed to ThreadNodeHash
- ThreadGroupHash should be renamed to ThreadHash
- ThreadGroup::Group should be a struct named Thread instead
- move ThreadGroup::Node logic to ThreadNode akin to Union/Find
- rename ThreaddGroup::Group to Thread
2020-01-20 16:03:06 +02:00
Manos Pitsidianakis 1eb49efb22
melib/threads: use all References in thread building
WIP
2020-01-20 16:03:06 +02:00
Manos Pitsidianakis a365a846b8
Replace StackVec with smallvec::SmallVec
SmallVec has a less buggy and better implementation.
2020-01-20 15:58:59 +02:00
Manos Pitsidianakis c0ac643f05
melib: add datetime module
Datetime module adds POSIX time functions interface
2020-01-06 16:10:36 +02:00
Manos Pitsidianakis 58209d6f6b
Replace some panics with errors 2019-11-27 17:42:11 +02:00
Manos Pitsidianakis f8a1a6caa5
melib: replace find_thread_group with find_root_hash
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.
2019-11-17 12:05:52 +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 d1184d4ea5
ui/search: add sorting in search 2019-11-08 15:13:41 +02:00
Manos Pitsidianakis 6e75160b70
melib: turn unicode algos and backends into features 2019-09-21 21:29:33 +03:00
Manos Pitsidianakis fb7b038ee1
ui: add set_seen shortcut in {Compact,Conversation}
Shortcut sets an entire thread as seen.
2019-09-20 10:26:08 +03:00
Manos Pitsidianakis 817c338a13
melib: fix metadata updates in Envelope updates 2019-09-15 23:38:31 +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 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 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 d84ceca88e
create text_processing crate 2019-07-27 01:41:04 +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 03317d74ca
melib: correct out of bounds access 2019-06-10 19:40:50 +03:00
Manos Pitsidianakis c6674a294d
melib: unwrap mailbox module 2019-06-10 19:40:50 +03:00