Manos Pitsidianakis
99fbac3806
Remove unused variables/functions
3 years ago
Manos Pitsidianakis
0882dbbad0
melib/Collection: put all fields behind a mutex
3 years ago
Manos Pitsidianakis
08d8c05a67
CompactListing: update self.rows{,_drawn} on row update
self.rows{,_drawn} were left unupdated, and stale envelope hashes could
result in panics
3 years ago
Manos Pitsidianakis
1bac926bdc
CompactListing: add row_attr macro
Add macro to calculate theme attribute for given thread row
3 years ago
Manos Pitsidianakis
5e1fa2d8d7
CompactListing: add select command
Select envelopes based on query
3 years ago
Manos Pitsidianakis
ddafde7b37
jobs: save handle for each Job
If we save the JoinHandle for each task, we can cancel it in future
commits if we have to timeout network requests.
3 years ago
Manos Pitsidianakis
a7e177586a
Fix clippy lints
3 years ago
Manos Pitsidianakis
bbedeed3e3
More imap async fixes
3 years ago
Manos Pitsidianakis
4721073bc3
Rename jobs1 to jobs
3 years ago
Manos Pitsidianakis
e06308fed2
MailBackend: change more methods to Futures
3 years ago
Manos Pitsidianakis
bfbaf3d617
Utilize EnvelopeRemove events
EnvelopeRemove events were not ever used in the UI
3 years ago
Manos Pitsidianakis
efb06be09b
melib: return Result<_> from operation()
Envelope might have been deleted before main thread requests an
operation, which is a race condition.
3 years ago
Manos Pitsidianakis
ca11c8e474
Remove useless debug prints
3 years ago
Manos Pitsidianakis
c07185a3aa
regexp: add priority field to regular expressions
3 years ago
Manos Pitsidianakis
465c78e903
Add Cell::keep_attrs() method
3 years ago
Manos Pitsidianakis
a17f0b4fd4
listing: rework MailListingTrait
split redraw_list() to redraw_threads_list() and redraw_envelope_list()
3 years ago
Manos Pitsidianakis
a86c1cbb26
listing: redraw on EnvelopeUpdate events
3 years ago
Manos Pitsidianakis
c5fe511d95
notmuch: don't remove tags from tag_index
When removing a tag, we shouldn't also remove it from the tag index.
3 years ago
Manos Pitsidianakis
eb701695f7
Remove fnv crate
3 years ago
Manos Pitsidianakis
d8135674df
themes: add {even,odd}_unseen, {even,odd}_selected, {even,odd}_highlighted
Suggested in #21
3 years ago
Manos Pitsidianakis
4930d1b46c
Add Italics, Blink, Dim and Hidden text attributes
Text attributes have been rewritten as bit flags, so for example instead of
"BoldUnderline" you'd have to define "Bold | Underline" in your theme
settings.
Requested in #21
3 years ago
Manos Pitsidianakis
3d7b9ff7cb
Move Query to melib
3 years ago
Manos Pitsidianakis
fd60be482f
Open sidebar for mailbox navigation with Left/Right arrow keys
Left/Right arrow keys change focus between the sidebar and mailbox
listing. If focused on sidebar, move arrow keys to select mailbox and
open with 'Enter'. Press Right arrow key to return to mailbox listing.
- Mailbox focused:
+--+-------------+
|~ |=============|
|~ |=============|
| |=============|
|~ |=============|
|~ |=============|
+--+-------------+
- Press `Left` arrow key
- Menu focused:
+--------+-------+
|~~~~ |=======|
|~~ |=======|
| |=======|
|~~~ |=======|
|~~~~ |=======|
+--------+-------+
- Press `Right` arrow key to return
3 years ago
Manos Pitsidianakis
840005022c
themes: add default tag theme attribute
The theme attribute key is "mail.listing.tag_default"
3 years ago
Manos Pitsidianakis
9ff54f236b
Add conf_override! macro
conf_override! wraps struct definitions and defines a secondary Override
struct that wraps each field in an Option. The macro mailbox_settings!
is used to select settings from an account & mailbox index. If a user defines an overriding setting, the macro returns the override instead of the immediately next in the hierarchy setting.
The selection is done for a specific field as follows:
if per-folder override is defined, return per-folder override
else if per-account override is defined, return per-account override
else return global setting field value.
3 years ago
Manos Pitsidianakis
651dda67cf
Respect autoload mailbox setting
3 years ago
Manos Pitsidianakis
106dae3334
Add config overrides to mailbox filter
If per-folder config filter is defined, it overrides the app-wide
filter.
3 years ago
Manos Pitsidianakis
a3600c0cd2
Add `filter` option in mail list
Filter mail in mail list.
Example:
[listing]
filter = "not flags:seen" # show only unseen messages
3 years ago
Manos Pitsidianakis
bae083cc8f
Rename Filter action to search
3 years ago
Manos Pitsidianakis
4ac52d9d5b
Replace every use of Folder with Mailbox
Use Mailbox for consistency.
3 years ago
Manos Pitsidianakis
b6efb14824
melib: remove Mailbox
Refactor Collection from melib to hold what folders have what envelopes.
Frontend accounts will now have a FolderEntry for each logical folder
and will unify many Account fields into one and eliminate a lot of
duplicate/dead code.
3 years ago
Manos Pitsidianakis
aab6b02db2
ui: clear selection with Esc
3 years ago
Manos Pitsidianakis
14b0ef8f37
Respect use_color conf value as well as NO_COLOR
3 years ago
Manos Pitsidianakis
22fb0c0844
ui: handle ViewMailbox in listing.rs
handling viewmailbox inside a listing instead of their parent/manager
component is a leftover from before they even had a parent/manager.
3 years ago
Manos Pitsidianakis
647cb10b33
ui: Use FolderHash instead of usize for folder cursor
Use FolderHash directly as a cursor type for folders within an account
isntead of having a usize (being the order of the folder within the
account) and figuring out the folder_hash everytime it's needed.
Add OfflineListing for offline accounts and AccountStatusChange event.
3 years ago
Manos Pitsidianakis
eef007600b
ui: improve theming coverage
3 years ago
Manos Pitsidianakis
eb501b6d50
ui: add ThemeAttribute argument to clear_area()
clear_area() sets the cleared cell attributes according to the new
argument.
3 years ago
Manos Pitsidianakis
f131e01bfc
Fix drawing getting stuck in empty terminal
Fix drawing getting stuck in loops when terminal is too small by
checking for it.
3 years ago
Manos Pitsidianakis
144eb62b76
ui: force refresh_mailbox etc on Mailbox{Delete,Create}
3 years ago
Manos Pitsidianakis
8b6ea8de9a
Remove ui crate
Merge ui crate with root crate.
In preparation for uploading `meli` as a separate crate on crates.io.
Workspace crates will need to be published as well and having a separate
`ui` crate and binary perhaps doesn't make sense anymore.
3 years ago
Manos Pitsidianakis
6a7cae0988
ui/themes: add NO_COLOR support
https://no-color.org/
3 years ago
Manos Pitsidianakis
5dc477bcd5
Fix some unused etc warnings
3 years ago
Manos Pitsidianakis
1e2b3c073d
ui/themes: add ThemeAttribute
Consolidate {fg,bg} color theme settings to ThemeAttribute and add Attr
(bold, etc).
3 years ago
Manos Pitsidianakis
a1c449e585
ui/themes: add theming to ConversationsListing, sidebar
3 years ago
Manos Pitsidianakis
a9842cacee
ui: add theming support
Configuration flag "terminal.themes" has two default theme entries,
"dark" and "light".
This commit alters only CompactListing for theme support.
3 years ago
Manos Pitsidianakis
63ff25b36a
ui/listings: add folder_hash field
No reason not to have it stored and discover it whenever it's needed.
3 years ago
Manos Pitsidianakis
e07b5faf6e
melib/threads: already-exists check in threads insert
3 years ago
Manos Pitsidianakis
350fafb515
melib/thread: add attachments field to Thread
3 years ago
Manos Pitsidianakis
5e68d600b9
melib/threads: Split ThreadGroup::Group to Thread
Create Thread struct.
3 years ago
Manos Pitsidianakis
d9269335a1
melib/threads: rename thread hashes
- Rename ThreadHash to ThreadNodeHash
- Rename ThreadGroupHash to ThreadHash
3 years ago