This was a bad UX artifact from the very first meli versions. There's no
need to keep it around.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Split mailbox related jobs out of JobRequest enum to its own enum since
JobRequest is getting too big to be readable.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Sometimes watch futures from backends send refresh events for mailboxes
that have not been fetched yet. That'd trigger fetching them in the
background, which is bad when the mailboxes are big and not wanted by
the user in the first place.
This commit adds a force parameter that specifies whether the loading
must be forced (e.g. when wanting to display the mailbox) or not.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
- Use .Oo/.Oc for inline Optional arguments
- Replace "thread" selection with "entry"
- Spell out alternative arguments in set seen | unseen
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Add consumption of undercurl escape codes without parsing colors, as
there is no support for that in Cell yet.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Commit 814af0e94d broke compilation with MSRV, it was not caught by CI
tests because they do not check the test targets for MSRV verification.
Fixes: 814af0e94d ("meli/args: add --gzipped flag to man subcommand")
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
- Building with sqlite3 non-bundled may result in compile-time error if
the system version is not new enough; the bindgen feature must be
enabled to create ffi bindings from the system version.
- Some unused code warnings show up if some features are disabled,
refactor code to make them go away.
- Update libloading to 0.8 to prevent dual dependencies in
Cargo.lock (rusqlite's bundled feature requires it)
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Accept "-" operand in create_config and test_config subcommands as
stdout and stdin respectively.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Add --gzipped flag to print a manpage without decompressing it, for
piping the output to a file. Because why not.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Move execution of opt.subcommand, if it is given, in a method of the Opt
struct. The main() function is already too long given that it sets up
and handles the event loop, so this reduces the complexity a bit.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Last digit of unread counts when showing scroll bar was overwritten by
scroll bar. If scroll bar is visible, shift the unread count one column
to the left.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Configuration entries `use_token` and `timeout` were not included in the
JMAP section so add them.
Related to #422
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Let the widget decide how much area it needs instead of providing a
limited subsection. On small screens it can lead to not enough space.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Instead of providing the horizontal range to draw as x_start and x_end
values, provide a range instead. This is to ensure that when you want to
draw from a bounds/row iterator, which has a col() method that returns
std::ops::Range<usize>, you don't end up drawing from col().start up to
including col().end like I foolishly did.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
.. And not just the ones defined in the configuration. Previously, it'd
only work if the mailbox was defined in the configuration file.
Also, make it so that the default mailbox is selected when meli is first
invoked, not just when changing to another account later.
Fixes#350
Resolves: https://git.meli-email.org/meli/meli/issues/350
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Paths entered via command were not expanded as soon as the text was
converted into a PathBuf, but when the save-to-file function was called.
This resulted in tilde expansion not happening until then, which because
of buggy behavior the previous commit fixed (expanding the tilde in the
middle of a path and pushing it to an existing path overwrites its
value, because expanding the tilde usually results in an absolute path),
resulted in the correct behavior. The invalid path was still visible on
the success message.
Instead, expand the path right away and then do modifications like
setting filename etc.
Fixes: #431
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
ShellExpandTrait was not expanding paths properly: tilde was expanded
even if it wasn't the first byte in the sequence. Since $HOME tends to
be an absolute path, the entire value of the path accumulator up till
that point was overwritten, meaning a /path/to/~/some/file would get
expanded to ${HOME}/some/file.
ShellExpandTrait was also not completing paths properly, especially
between the generic impl and the linux specialized one. This commit adds
test to make sure their behavior is synced and changes the result type
to an enum to make the result more descriptive.
Concerns #431.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Update in v0.8.5 required changes to serialization code;
toml::to_string() now serializes TOML documents, not values.
This commit replaces all occurances with toml::Value serializations.
Fixes: 8fff7401 ("Update yanked zerocopy dependency")
Closes: #429
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
RowsState::rename_env was not updating all EnvelopeHash related fields
when a receiving an EnvelopeRename event, which can cause panics if the
listing tries to index it.
Concerns #426
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
RefreshEvents where put into event_queue field, but were never processed
again. Process them when Mailbox becomes available.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Change ImapConnection::read_lines function argument termination_string
from &[u8] to Option<&[u8]>.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
This new setting defines shell commands with names that can be applied
at any time on a text attachment by using the `filter` command without
any arguments.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>