Commit Graph

1247 Commits (alpha-0.6.0)

Author SHA1 Message Date
Manos Pitsidianakis 6d9f584de3
Update nix to 0.16.1 2020-01-21 12:02:21 +02:00
Manos Pitsidianakis a1c449e585
ui/themes: add theming to ConversationsListing, sidebar 2020-01-21 12:02:21 +02:00
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.
2020-01-21 12:02:21 +02:00
Manos Pitsidianakis 63ff25b36a
ui/listings: add folder_hash field
No reason not to have it stored and discover it whenever it's needed.
2020-01-20 16:03:29 +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 20f86f2741
ui/listing: add mailbox reload rate limit 2020-01-20 16:03:06 +02:00
Manos Pitsidianakis 0ac10aa4d0
Some listing refactoring 2020-01-20 16:03:06 +02:00
Manos Pitsidianakis f58ed387dd
ui: add ratelimiting in UI notifications and drawing 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 56e3ea1548
melib/imap: refactor early error exit 2020-01-20 15:58:59 +02:00
Manos Pitsidianakis 7f8c638361
melib/imap: add mailbox creation ability 2020-01-20 15:58:59 +02:00
Manos Pitsidianakis 853fe14128
melib: fix two minor email parsing bugs
- windows-1250 encoding not being recognized
- spaces in Message-ID header messing up parsing '<' + msg-id + '>'
structure
2020-01-20 15:58:59 +02:00
Manos Pitsidianakis 6835968d9a
melib/datetime: convert date to utc before converting to unix epoch 2020-01-20 15:58:59 +02:00
Manos Pitsidianakis 86d8419ce7
ui: add manual_refresh, refresh_command settings
manual_refresh Ar boolean
  (optional) if true, do not monitor account for changes (shortcut listing.refresh)
  refresh_command Ar String
  (optional) command to execute when manually refreshing (shortcut listing.refresh)
2020-01-20 15:58:59 +02:00
Manos Pitsidianakis 5e912db461
Send timer ID as si_value to SIGALRM handler
Associate each alarm signal with the timer of its origin.
2020-01-20 15:58:59 +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 b6403f486b
ui: Remove RefreshMailbox event
Leftover from older versions, it wasn't used  anywhere
2020-01-07 12:56:28 +02:00
Manos Pitsidianakis ca7d72e732
melib: Replace String with Cow<'static, str> 2020-01-07 12:55:27 +02:00
Manos Pitsidianakis 9fcc868acd
remove chrono 2020-01-06 16:11:46 +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 f6de511abd
plugin-backend: add BackendOp for PluginBackend 2020-01-02 00:13:18 +02:00
Manos Pitsidianakis beeea9a0c1
ui: implement PosixTimer
Add interface for posix timers timer_create(2) time(7)
2020-01-02 00:11:13 +02:00
Manos Pitsidianakis 6671fe926e
melib: don't treat missing end boundary as error
Don't treat missing end boundary as error in multipart attachments.

python3's nntplib seems to return MIME attachments with this property
2020-01-02 00:09:21 +02:00
Manos Pitsidianakis 8694278369
ui: add auto_choose_multipart_alternative
Choose text/html by default if text/plain is empty in
multipart/alternative attachments

This happens in some newsletters I've come upon
2020-01-02 00:08:21 +02:00
Manos Pitsidianakis 3d84f3b9ad
notmuch: remove needless clones 2020-01-02 00:05:36 +02:00
Manos Pitsidianakis b964a6a033
Plugins WIP #2 2019-12-27 17:57:48 +02:00
Manos Pitsidianakis 12509748f6
Plugins WIP 2019-12-23 17:08:57 +02:00
Manos Pitsidianakis 21526b5faf
melib: make Work use FnOnce closures
There was no need to use Fn() instead of FnOnce()
2019-12-20 00:53:43 +02:00
Manos Pitsidianakis 8de5a9412d
ui/compose: small panic fix
if user (Esc)apes from the send dialog the selector widget will not
  return any values
2019-12-20 00:39:04 +02:00
Manos Pitsidianakis 0739f80f4b
ui/MailView: print attachment tree instead of list 2019-12-18 15:46:21 +02:00
Manos Pitsidianakis 92826f982f
melib/attachments: add MultipartType::Related kind 2019-12-18 15:45:50 +02:00
Manos Pitsidianakis 9211913405
meli/backends: honor mailbox subscriptions in IMAP/JMAP 2019-12-18 15:44:44 +02:00
Manos Pitsidianakis 7eceef93e9
melib/backends: remove folder_operation
folder_operation functionalities will go to BackendFolder trait
2019-12-18 15:43:30 +02:00
Manos Pitsidianakis 9080e0fd96
melib: rename FolderConf `rename` field to alias 2019-12-18 15:40:57 +02:00
Manos Pitsidianakis 450c9f2b1c
Add pre-push git hook 2019-12-18 12:38:26 +02:00
Manos Pitsidianakis c23cc45edd
melib: fix test import not found 2019-12-18 08:59:04 +02:00
Manos Pitsidianakis bb18ddc944
ui: make search cache rebuild account-specific
ReIndex command is supposed to be account specific yet the account
argument was ignored
2019-12-18 08:59:04 +02:00
Manos Pitsidianakis 2b6f6ab42c
melib: Add BackendFolder methods, move special usage logic to backend
- add count() method to return (unseen, total) counts
- add is_subscribed()
- add set_special_usage() and set_is_subscribed()

concerns #8
2019-12-18 08:58:49 +02:00
Manos Pitsidianakis 7bd2b6932d
Fix meli.conf.5 typo and formatting 2019-12-16 00:14:55 +02:00
Manos Pitsidianakis 8f63572584
Small refactors to avoid implicit unwrap() panics 2019-12-15 19:47:42 +02:00
Manos Pitsidianakis 0201241786
melib/backends: MailBackend::refresh() returns Result
Handle cases were refresh() would fail properly. Fixes a crash reported in #13
2019-12-15 08:55:08 +02:00
Manos Pitsidianakis 17a0f31b3e
ui/accounts: split StartupCheck event semantics
UIEvent::StartupCheck was meant to notify the UI that a folder had made
progress and polling its async worker would return a
Result<Vec<Envelope>>. However the StartupCheck was received by
MailListing components which called account.status() which did the
polling. That means that if the polling got back results, the listing
would have to call account.status() again to show them. This is a
problem in configurations with only one account because there aren't any
other sources of event to force the listing to recheck account.status()

A new event UIEvent::WorkerProgress will do the job of notifying an
Account to poll its workers and the account will send a startupcheck if
it has made progress. That way the refresh progress is as follows:

Worker thread sends WorkerProgress event -> State calls appropriate
account's account.status() method -> account polls workers, and if there
are new results send StartupCheck events -> State passes StartupCheck
events to components -> Listings update themselves when they receive the
event
2019-12-14 19:56:43 +02:00
Manos Pitsidianakis 65efb23f14
melib/MailBackend: add refresh() method
Initiate refresh manually.
2019-12-14 18:58:59 +02:00
Manos Pitsidianakis d2b4057b7b
melib/MailBackend: add connect() method 2019-12-14 18:58:55 +02:00
Manos Pitsidianakis 10368612ab
ui/listing: prevent spinning on is_online check
Since self.component is never drawn if account is not online, it will
remain dirty and everything will be redrawn again and again, blocking
the UI.
2019-12-14 18:57:58 +02:00
Manos Pitsidianakis ab3e01359a
ui/Component: change set_dirty() to set_dirty(value)
Next commit will need to set a child component as not dirty so we need
set_dirty(value) instead of set_dirty() that always sets is to true.
2019-12-14 18:57:58 +02:00