Commit Graph

18 Commits (a37d5fc1d19f5b195361ddb3ba045d848266285d)

Author SHA1 Message Date
Guillaume Ranquet a37d5fc1d1 conf/shortcuts: implement a key to command mapping
Run cargo lints / Lint on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 13m15s Details
Run Tests / Test on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 20m58s Details
Permits users to map keys in their configuration file to an array of meli commands

e.g:
[shortcuts.listing]
commands = [ { command = [ "tag remove trash", "flag unset trash" ], shortcut = "D" },
             { command = [ "tag add trash", "flag set trash" ], shortcut = "d" } ]

Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
2024-01-18 15:53:35 +01:00
Manos Pitsidianakis 7861fb0402
Fix typos found with `typos` tool
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-01-03 11:08:55 +02:00
Manos Pitsidianakis 8185f2cf7d
meli: add deny clippy lints and fix them
Run cargo lints / Lint on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 10m56s Details
Run Tests / Test on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 17m46s Details
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-01-01 15:59:13 +02:00
Manos Pitsidianakis f63774fa6d
Fix new clippy lints (1.75)
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-29 19:51:44 +02:00
Manos Pitsidianakis 3b4acc15a5
view/filters: add tests
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:39 +02:00
Manos Pitsidianakis 23c15261e7
mail/view: abstract envelope view filters away
Modularize an envelope view by introducing a stack of "view filters".

Example uses:

- html email can have a view on top of it that is plain text conversion
- selecting and viewing text/* attachments is just appending a new filter at
  the stack

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:39 +02:00
Manos Pitsidianakis 3495ffd61b
types: Change UIEvent::Notification structure
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:39 +02:00
Manos Pitsidianakis e0adcdfe15
terminal/cells: move rest of methods under CellBuffer
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-11-30 11:04:05 +02:00
Manos Pitsidianakis 6506fffb94
Rewrite email flag modifications
Tests / Test on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 12m35s Details
Tests / Test on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 14m2s Details
Flag and tag modifications are now somewhat typed better, and the
frontend applies them on its own on success. This means that if you set
an unseen mail as seen but it was already seen in the backend, you will
see the change locally. Previously it would remain unseen.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-11-24 12:58:21 +02:00
Manos Pitsidianakis 73b3ed559d
mail/view: fix forward dialog not workng
Tests / Test on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 10m55s Details
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-16 20:28:33 +03:00
Manos Pitsidianakis b673af02ac
accounts.rs: move to crate root
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-05 15:44:43 +03:00
Manos Pitsidianakis f0075b86cf
ui: show descriptive tab names for composer and threads
Instead of showing the nondescript tab names in the tab area,
use Subject or To: data from the draft in the composer and a subject
from the thread entries.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-03 10:17:24 +03:00
Manos Pitsidianakis 49c36009ce
mail/view: don't initialize entire thread at once
For large threads, this would result in a lot of futures being created.
The user just wants to read one entry, not all of them. So prioritize
the open entry and some of the latest ones as an optimistic
pre-fetching.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-02 21:29:35 +03:00
Manos Pitsidianakis c7825c76c3
mail/view: handle dialog Esc in the parent component
Dialogues handled Esc themselves, which meant the event didn't bubble up
to their parent to let them know they should remove the dialogue. This
commit fixes that.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-02 21:29:35 +03:00
Manos Pitsidianakis 3344a8dbf6
mail/view: remove unnecessary Clone derives
There's no need to clone MailViews when opening them in new tabs,
just initialize new ones with the same metadata. That saves us the
trouble of implementing Clone for all related types.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-02 19:36:12 +03:00
Manos Pitsidianakis 3963103d55
contacts: prevent duplicate contact creation
Tests / Test on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 8m9s Details
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>
2023-08-23 17:29:21 +03:00
Manos Pitsidianakis 52874f9a97
mail/view: cancel previous jobs on MailView drop/update
When MailView loads a new thread or gets dropped, cancel all pending
jobs.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-08-21 10:19:14 +03:00
Manos Pitsidianakis 7c9a4b4b7c
meli: Move components/mail -> mail 2023-08-11 13:01:32 +03:00