Commit Graph

33 Commits (master)

Author SHA1 Message Date
Manos Pitsidianakis 8ec6f22090
Use ShellExpandTrait::expand in more user-provided paths
ShellExpandTrait::expand was not used consistently, leading to only some
functionalities supporting things like tilde expansion.

Fixes #387

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
4 weeks ago
Manos Pitsidianakis 974502c6ff
melib/addressbook: impl Hash for Card
Implement hashing for Card.

This fixes the appearance of duplicate entries in the add contacts
selector in an envelope view when an address appears more than one time
in the envelope headers.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 months ago
Manos Pitsidianakis f900dbea46
Use cargo-derivefmt to sort derives alphabetically
Used https://github.com/dcchut/cargo-derivefmt

With command:

cargo install --locked \
--git https://github.com/dcchut/cargo-derivefmt \
--bin cargo-derivefmt \
--rev 2ff93de7fb418180458dd1ba27e5655607c23ab6

Since it's not on crates.io at the moment.

Sample diff:

  -#[derive(Debug, Deserialize, Clone, Serialize)]
  +#[derive(Clone, Debug, Deserialize, Serialize)]

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
6 months ago
Manos Pitsidianakis a337e2269e
contacts: refactor module structure
To prepare for more functionality, refactor contacts module.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
9 months ago
Manos Pitsidianakis 3963103d55
contacts: prevent duplicate contact creation
When adding contacts from an envelope view, its hash/id/key was a random
Uuidv4, so it was always possible to add a contact again and again with
no limits. Now, the id is calculated from the hash of the email address
and display name, preventing duplicate additions.

Note that the hash algorithm is not supposed to be stable across
versions, meaning that in the future the same contact might have a
different hash. This means a more sophisticated method for
detecting/disallowing dupes must eventually be introduced.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
9 months ago
Manos Pitsidianakis 5f29faa640
melib: clippy lint fixes 11 months ago
Manos Pitsidianakis 5699baecfb
melib: add utils::{futures, random} 12 months ago
Manos Pitsidianakis 85d4316a6a
Replace old logging module with the `log` create 1 year ago
Manos Pitsidianakis b1a7188771
Clippy fixes 1 year ago
Manos Pitsidianakis 2878bbb8c8 melib/addressbook: add parser for mutt alias file 1 year ago
Manos Pitsidianakis bd22f986f0 melib: fix clippy lints 2 years ago
Manos Pitsidianakis 2580522931
melib/addressbook: log vcard parsing failures 3 years ago
Manos Pitsidianakis 733de5a5fb
Fix some clippy suggestions 3 years ago
Manos Pitsidianakis 3dba6fdf60
melib/datetime: add posix locale arg in timestamp_to_string() 3 years ago
Manos Pitsidianakis c6c0da7fcb
melib: cleanup commit
Cleanup melib module exports, add some document tests, change some
documentation.
4 years ago
Manos Pitsidianakis eb701695f7
Remove fnv crate 4 years ago
Manos Pitsidianakis c0ac643f05
melib: add datetime module
Datetime module adds POSIX time functions interface
4 years ago
Manos Pitsidianakis afff63c781
ui: load vcards to addressbook with vcard_folder account setting 5 years ago
Manos Pitsidianakis 5beed91df2
contacts: add support for externally managed contacts
Adds support for contacts (Cards) marked as `external_resource` which
prevents modifications from happening. No way to import external
contacts is added yet.
5 years ago
Manos Pitsidianakis dc525b9ddd
contacts: make CardId an enum
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.
5 years ago
Manos Pitsidianakis cfe6138c44
melib: add VCard parsing for contacts
Add rough VCard conversion for melib::Card, to use eventually with
contacts.
5 years ago
Manos Pitsidianakis 24831b3c13
Fix warnings, lints, and 2018 errors 5 years ago
Manos Pitsidianakis d772d10d66
merge FirstName/LastName fields in Contacts
First names and Last names are an anglocentric concept and do not apply
cleanly to the rest of the world's cultures.
5 years ago
Manos Pitsidianakis 5d9af8e32b
ui: improve contact additions from mail view 5 years ago
Manos Pitsidianakis bf038428c2
Run rustfmt 5 years ago
Manos Pitsidianakis b1d25e6d8d
add autocomplete suggestions in field 5 years ago
Manos Pitsidianakis 5e306130fb
Fix clippy warnings 5 years ago
Manos Pitsidianakis e285d1006b
Open Contacts list from accounts tab 5 years ago
Manos Pitsidianakis 00abea5bff
Make Entity `Send` 5 years ago
Manos Pitsidianakis c135650018
Add Contact edit
concerns #11
5 years ago
Manos Pitsidianakis bbaf87e345
Add type synonyms for Uuids
closes 58
5 years ago
Manos Pitsidianakis 62168e9183
Add contact view page, edit headers in compose, index style in conf 5 years ago
Manos Pitsidianakis 04411f1003
rename 'mod.rs' files
closes #53
5 years ago