Commit Graph

654 Commits (77936e0cd55c1924d7718fdde1debdf1c29149ae)

Author SHA1 Message Date
Manos Pitsidianakis 77936e0cd5
melib: add notmuch backend
Missing:
- Watching for updates functionality
- Using tags
- Search
2019-11-15 22:56:45 +02:00
Manos Pitsidianakis 7463248da8
melib: change BackendOp::set_flag() signature 2019-11-15 21:32:55 +02:00
Manos Pitsidianakis ede512200b
conf: move FolderConf to melib
This will be needed to add notmuch-specific configuration settings in
the FolderConf struct in the next commit
2019-11-15 19:52:39 +02:00
Manos Pitsidianakis 8f36678abf
melib: make Backendfolder::children return slice 2019-11-14 17:55:24 +02:00
Manos Pitsidianakis 56cda63c83
Fix some warnings 2019-11-14 17:55:24 +02:00
Manos Pitsidianakis c2da09de99
ui/sqlite3: insert account if non-existent 2019-11-12 22:20:20 +02:00
Manos Pitsidianakis f83db67a38
melib/imap: don't stop IDLE session
Previous behaviour: connection with IDLE was stopped every 5 minutes to
poll the other threads. As a result messages received within that time
window when there was no IDLING were never received.
Current behaviour: polling is done in the main connection.
2019-11-12 22:18:00 +02:00
Manos Pitsidianakis 94152f7336
ui: add multiplier shortcuts to cursor movements
Prepend a cursor movement (Up/Down/PageUp/PageDown) with a multiplier
(e.g 23+Down, that is '2' then '3' then 'Down') to increase the
movement's length.
2019-11-12 22:14:44 +02:00
Manos Pitsidianakis 134178a74a
ui/sqlite3: add remove/update for RefreshEvent
Remove and/or update envelopes in sqlite3 db when the appropriate events
happen.
2019-11-12 13:09:43 +02:00
Manos Pitsidianakis c6a4fcb959
ui: fix Account watching bug
Account::is_online(&mut self) should be called from ui/src/state.rs
only, since it launches the watcher threads when an account goes from
offline to online. If it's called from elsewhere the watcher threads
might not get launched ever.
2019-11-12 13:09:09 +02:00
Manos Pitsidianakis c9c4e1ea60
ui/sqlite3: add has:attachment query 2019-11-11 22:59:37 +02:00
Manos Pitsidianakis 35e34d1c09
ui: add "is:" alias for "flags:" query 2019-11-11 22:48:39 +02:00
Manos Pitsidianakis 6ce88667c0
ui/sqlite3: add flag query support 2019-11-11 22:43:08 +02:00
Manos Pitsidianakis dce1c39b48
ui: add mailcap support 2019-11-11 22:20:16 +02:00
Manos Pitsidianakis 9cd00cf53a
sqlite3: add accounts and folders table 2019-11-11 18:01:01 +02:00
Manos Pitsidianakis 1d6ef92a4f
ui: make StatusPanel grid growable 2019-11-11 17:59:36 +02:00
Manos Pitsidianakis 776dc107c2
Fix Pager::print_string() with empty string 2019-11-11 00:48:42 +02:00
Manos Pitsidianakis 5761f854e2
melib: Add FolderPermissions
permissions() method on BackendFolder and SetPermissions in
FolderOperation enum.
2019-11-11 00:47:23 +02:00
Manos Pitsidianakis 97e20b22a8
ui: update PlainListing
Remake PlainListing after CompactListing to add columns, filtering,
selection.
2019-11-10 23:04:11 +02:00
Manos Pitsidianakis c1902f96b5
imap: add UIDVALIDITY check
On UIDVALIDITY change, discard cache and force rescan.
2019-11-10 23:02:23 +02:00
Manos Pitsidianakis 0cbc44fd0e
ui: exit contact add dialog with Esc in mail view 2019-11-10 13:33:56 +02:00
Manos Pitsidianakis 06d99c7f92
ui: Add save attachment command
use as `save-attachment ATTACHMENT_INDEX PATH`
2019-11-10 13:33:22 +02:00
Manos Pitsidianakis 580f0be8a4
imap: fix cases that would block connection
Fix blocking if TLS negotiation can't start

Fix blocking if IDLE connection dies.
2019-11-10 13:32:31 +02:00
Manos Pitsidianakis a907b9c21d
Fix melib test errors 2019-11-09 18:10:22 +02:00
Manos Pitsidianakis 8b781cbbe0
melib: StackVec bounds fix 2019-11-09 17:46:07 +02:00
Manos Pitsidianakis 1bd343988e
ui: add horizontal scrolling in pager
It only took what, 3 years?
2019-11-09 17:45:23 +02:00
Manos Pitsidianakis e600b0252f
text_processing: add line_break method
In preparation for format=flowed support, add a line_break method in the
text_processing Trait, now renamed from Graphemes to TextProcessing.
2019-11-09 17:44:22 +02:00
Manos Pitsidianakis 098982015b
ui/conversations: show all participating addresses in entry
Show all unique From: values of addresses in thread entries in
Conversations
2019-11-09 13:58:16 +02:00
Manos Pitsidianakis 36eccdf514
Add search documentation 2019-11-08 17:51:01 +02:00
Manos Pitsidianakis 74672f0807
ui: Add CacheType option in configuration
CacheType's value dictates which cache backend to use: none, or sqlite3
2019-11-08 17:51:01 +02:00
Manos Pitsidianakis 229e879c26
ui/imap: select user given folder before search
IMAP search() didn't select a folder before searching, thus searching
the mailbox the previous user of self.connection had selected.
2019-11-08 17:50:55 +02:00
Manos Pitsidianakis 99697a8fd5
ui: Add search for IMAP
Add basic search utilising the default SEARCH capability.
2019-11-08 15:13:42 +02:00
Manos Pitsidianakis 27edd96493
Cache and Sqlite3 cleanups 2019-11-08 15:13:42 +02:00
Manos Pitsidianakis e396b2f72b
ui: add query translation to SQL SELECTs 2019-11-08 15:13:42 +02:00
Manos Pitsidianakis 7936aef476
Fix infinite watch threads spawning
Watch threads were launched every time the account's online status was
checked, added a check to only do it when it was previously offline.
2019-11-08 15:13:42 +02:00
Manos Pitsidianakis 749d453f00
ui: add query parsers 2019-11-08 15:13:42 +02:00
Manos Pitsidianakis 8488ce21bf
ui: move is_online() check to Context
Context needs to know when an account gets online in order to get the
mailbox hashes and launch the watcher threads for this account. Instead
of assuming all accounts are online when launching meli, move the
initialisation logic to an is_online() method on Context to do it on
demand.

The is_online() method is then called by ui::components::mail::Listing
everytime it's drawn to check for status changes.
2019-11-08 15:13:42 +02:00
Manos Pitsidianakis 61fa6d3d4b
ui: show supported IMAP CAPABILITIES list in Status
In status page for IMAP accounts, show a list of CAPABILITIES and
whether meli supports them
2019-11-08 15:13:42 +02:00
Manos Pitsidianakis d780d81891
Add account statuses in Status tab
List accounts and information about them in Status tab
2019-11-08 15:13:42 +02:00
Manos Pitsidianakis f56b89dde3
melib: add as_any() method to MailBackend trait
Cast the trait object into an &Any object. Then we can downcast it to
its actual type with downcast_ref().
2019-11-08 15:13:42 +02:00
Manos Pitsidianakis 8ba9500de6
sqlite3: small refactors and fixes 2019-11-08 15:13:42 +02:00
Manos Pitsidianakis f718510eeb
ui/listings: split events according to length
Some events are invalid when there are no messages shown in the listing.
Instead of checking for self.length > 0 in each of these events, put
them together in an if block.
2019-11-08 15:13:41 +02:00
Manos Pitsidianakis 498f8e8e21
ui/listings: Show errors when filtering
Errors were not shown properly because the data_columns grids were being
overwritten by redraw_list(). Call redraw_list() only if filtering was
succesful.
2019-11-08 15:13:41 +02:00
Manos Pitsidianakis 78955e3199
sqlite3: rename index db to index.db 2019-11-08 15:13:41 +02:00
Manos Pitsidianakis d0c9774fe2
imap: disable sqlite3 full text search
Disable temporarily until server-side search is implemented.
2019-11-08 15:13:41 +02:00
Manos Pitsidianakis 70fb34a2e4
ui/sqlite3: add env body in sqlite3 fts table
Add the envelope body in the full text search table inside the sqlite3
db. Now search returns results matching the e-mail content as well.
2019-11-08 15:13:41 +02:00
Manos Pitsidianakis 3b5dc33d3e
ui/Account: store backend behind an Arc<RwLock<_>>
The backend object stores the state of the backend associated with an
account.

Hide the backend object between a mutex, in order to be able to share it
with threads in the next commit.
2019-11-08 15:13:41 +02:00
Manos Pitsidianakis d926cadc4d
melib: remove argument from MailBackend operation()
The operation() method on the MailBackend trait returns a trait object
that can read or modify an Envelope directly from the backend. This is
used to get eg the envelope's text, or set flags. It has two arguments,
envelope hash and folder hash.

Only the Maildir backend needed the latter argument, and it can be replaced with a dictionary to match envelope hashes to folder hashes within the Maildir backend.
2019-11-08 15:13:41 +02:00
Manos Pitsidianakis 0a606a71d1
Add reindex command 2019-11-08 15:13:41 +02:00
Manos Pitsidianakis 78eecbb104
melib: Hide Envelope behind RwLock
Envelope can now only be accessed from within a RwLock. Two new structs
are introduced: EnvelopeRef and EnvelopeRefMut. These hold a reference
to an Envelope and the mutex guard that keeps them alive.

This change allows sharing of the envelopes hash map amongst threads.
2019-11-08 15:13:41 +02:00