1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-08-13 17:03:48 -04:00
Commit Graph

785 Commits

Author SHA1 Message Date
Andrew Chen
5ac3d1d5c2 Use existing LocalMessage for the JB notifications.
LocalMessage already has a content preview in it; reuse that.
Remove unneeded MimeMessage#getPreview() method now that we don't need
to generate a preview anymore.
2013-01-07 23:20:35 -08:00
Andrew Chen
068f87380c More javadoc 2013-01-07 22:15:49 -08:00
Andrew Chen
d4eae05630 Javadoc 2013-01-07 22:11:04 -08:00
Danny Baumann
45328189f3 Strip off signatures from preview. 2013-01-07 10:39:08 +01:00
Danny Baumann
6f7ec3e401 Incorporate review comments. 2013-01-05 13:21:17 +01:00
cketti
bcd52a6707 Fetch in-reply-to header when downloading envelope on IMAP accounts 2012-12-13 17:03:35 +01:00
cketti
44348e08a4 Create non-existent IMAP folders when copying/moving messages 2012-12-10 21:42:57 +01:00
cketti
7db33ce8c6 Ignore null-rows in results of SQL queries 2012-12-10 17:34:48 +01:00
cketti
8d652b2f61 Fix some compiler warnings 2012-12-07 15:50:55 +01:00
cketti
7b49f67c51 Remove unused methods 2012-12-07 15:47:15 +01:00
cketti
bc4fb530d0 Remove all code using the old unread/flagged count database columns 2012-12-07 15:45:36 +01:00
cketti
04ec2abd2c Use local unread/flagged count in folder list and message list 2012-12-07 15:04:53 +01:00
cketti
d5bb462917 Don't create Message objects when changing flags of selected messages
This changes the interface to MessagingController and the way flags are
updated in the database. Now messages aren't changed one by one but in
batches of 500. This should give better performance, but breaks the
unread and flagged count. I'm not very sad about this, because now we
can move towards only displaying the number of unread/flagged messages
in the local database.
2012-12-06 06:26:38 +01:00
cketti
c0b5255e24 Make most important flags separate database columns
This is the first step to speed up searches and flag updates.
2012-12-04 05:13:58 +01:00
cketti
b2098c8d1c Add activity that is displayed during database upgrades
See UpgradeDatabases.java for a detailed description of the upgrade
process.
2012-12-01 08:02:55 +01:00
luyang
bbdec62e37 Fix for StrictMode error.
When the device lost connectivity, a StrictMode error could be thrown since
the stream was never closed.
2012-11-28 19:55:42 +01:00
cketti
2db8034c31 Use one database transaction when doing bulk flag changes
Previously we used one transaction per message. For 500 messages the
database updates alone took over 30s on my Nexus 7.
2012-11-27 16:46:59 +01:00
cketti
b108e7a539 Don't fetch already downloaded messages found by a server-side search 2012-11-15 21:05:45 +01:00
cketti
e339dd1f10 Delete all messages in a thread when 'delete' is used on the placeholder 2012-11-03 01:52:45 +01:00
cketti
2e1d25118a Fix JOIN-condition when searching for messages 2012-11-01 20:33:13 +01:00
cketti
08b361ed36 Fix search for Unified Inbox
We don't want to list the Inbox contents of all accounts but the
contents of folders whose "Unify" setting is true.
2012-10-31 01:45:44 +01:00
cketti
303c1ee85d Extract generation of SQL queries for searches to SqlQueryBuilder 2012-10-29 02:27:34 +01:00
cketti
d703286833 Make LocalStore.searchForMessages() skip empty messages 2012-10-24 06:01:26 +02:00
cketti
ec76dca57f Remove unused stuff 2012-10-24 01:37:33 +02:00
cketti
1fcce6fb8a Add database indices for thread columns in 'messages' table 2012-10-24 01:03:59 +02:00
cketti
3bef05b55d Removed LocalStore hack introduced in 16d2326 2012-10-24 00:32:29 +02:00
cketti
1b98ce57e1 Notify observers (e.g. CursorAdapter) when the messages table changed 2012-10-24 00:08:44 +02:00
cketti
1d655f5bc2 Added ability to display special folders combining multiple accounts 2012-10-18 05:15:40 +02:00
cketti
20ed1ebe61 Code style cleanup 2012-10-17 20:52:03 +02:00
cketti
f1e433e6df Whitespace cleanup 2012-10-16 22:42:51 +02:00
cketti
83d5102f3d Merge branch 'new_search_framework' into content_provider
Conflicts:
	src/com/fsck/k9/fragment/MessageListFragment.java
2012-10-16 20:57:47 +02:00
cketti
cc74a2ad2e Switched to ContentProvider and CursorLoader to display the message list 2012-10-16 15:46:40 +02:00
Sander Bogaert
d27f909600 Add new search logic to the MessagingController and LocalStore classes. 2012-10-13 08:53:00 -04:00
cketti
16d2326033 Nasty hack to retain threads in MessageListFragment when polling 2012-10-10 03:02:36 +02:00
cketti
63b6b497a0 Early version of message threading
Missing:
- UI support for threading when polling
- code to upgrade existing installations
- UI elements to switch from/to threaded display mode
- threading of messages with same subject
2012-10-08 22:51:29 +02:00
Jesse Vincent
0c34a21ff0 Add a fromMe method on messages 2012-10-03 21:56:28 -04:00
Andrew Chen
39e2a973a1 Merge branch 'imapsearch'
* imapsearch:
  Change settings version to 18 to match what's currrently on master.
  Handle aborted imap searches by nuking in-progress connections.
  Move IMAP search into the Folder level.
  Remove duplicate notification on remote search start.
  Rename variables
  changed PREFERENCE_CLOUD_SEARCH_ENABLED from "cloud_search_enabled" to "remote_search_enabled" in activity/setup/AccountSettings.java to resolve FC.
  Add cloud search icon to local search result screen. Implement pull-to-remote-search.
  Log remote search exceptions in addition to toasting them.
  Add settings export for remote search settings.
  Whitespace; no functional changes.
  Handle implicit vs. explicit searches in ActionBar home button behavior.
  Whitespace fix; no functional changes.
  Add remote search actionbar icons.
  IMAP Search: log exceptions on remote search, properly dispatch MessageList changes.
  modified loadMessageForView() to dowload message if neither X_DOWNLOADED_FULL nor X_DOWNLOADED_PARTIAL.
  Add remote IMAP search support.

Conflicts:
	res/menu/message_list_option.xml
	res/values/attrs.xml
	res/values/themes.xml
	src/com/fsck/k9/activity/MessageList.java
	src/com/fsck/k9/preferences/Settings.java
2012-09-25 16:01:52 -07:00
Andrew Chen
2541753aff Handle aborted imap searches by nuking in-progress connections. 2012-09-25 15:46:30 -07:00
Andrew Chen
9f96cd36a7 Move IMAP search into the Folder level.
Should also consider moving the LocalStore search into the folder level and have the store call the folder level searches.
2012-09-25 14:34:59 -07:00
Andrew Chen
7631af1572 Log remote search exceptions in addition to toasting them. 2012-09-22 09:37:50 -07:00
cketti
2ee3378eef Use executeSimpleCommand() for UID COPY so the response type is checked
The previous code never failed e.g. on a "NO" response. That lead to
messages being deleted for a move action.
2012-09-14 02:08:39 +02:00
Rob Bayer
fdb1267cb1 Add remote IMAP search support.
* rbayer/IMAPsearch: (21 commits)
  More cleanup
  Code Cleanup getRemoteSearchFullText -> isRemoteSearchFullText line wraps for preference items
  Refactor to allow fetching of extra search results beyond original request.  Most code moved out of ImapStore and ImapFolder and into MessagingController.searchRemoteMessagesSynchronous.  Should make it easier to add remoteSearch for other server types.
  Prevent delete of search results while search results open
  remove duplicated code block
  Don't hide Crypto when IMAPsearch disabled
  Code Style Cleanup: Tabs -> 4 spaces Remove trailing whitespace from blank lines
  tabs -> spaces (my bad...)
  Fix opening of folders to be Read-Write when necessary, even if they were previously opened Read-Only.
  add missing file
  Working IMAP search, with passable UI.
  UI improvements
  Simple help info when enabling Remote Search
  Dependency for preferences
  Basic IMAP search working
2012-09-13 09:10:37 -07:00
Jesse Vincent
3799ecfb21 Check message uids first when comparing messages. message uids are less likely to be the same than folders, so it's a slight optimization 2012-09-12 21:56:17 -05:00
Jesse Vincent
d5f739030a Always save all headers. Not doing so is kind of a crazy space microoptimization and can get a little messy 2012-09-10 12:07:35 -04:00
Bernhard Redl
e5d56a4eac Fixes 4517: Junk special folder not autoconfigured (rfc6154 implementation was incomplete) 2012-09-09 19:12:37 -05:00
cketti
3253466f14 More magic to work around BinaryTempFileBodyInputStream 2012-09-09 01:15:26 +02:00
cketti
5678786c97 Properly closing InputStreams to avoid StrictMode warnings 2012-09-05 05:57:52 +02:00
Bernhard Redl
474f32ad02 changed parseFlags to directly manimpulate member 2012-08-30 18:15:19 +02:00
Bernhard Redl
56105bcfe3 + add support for $Forwarded IMAP flag 2012-08-29 02:26:38 +02:00
Bernhard Redl
89f6c2f6d0 upgraded Mime4J 0.7-SNAPSHOT -> 0.7.2 (fixes MimeMultipart parser bug) 2012-08-15 01:47:57 +02:00
cketti
83e57064ff Check database version after ending the transaction 2012-07-07 17:15:14 +02:00
cketti
d08169b004 Corrected indentation 2012-07-07 17:14:03 +02:00
cketti
400487b8aa Merge branch 'pullreq150' 2012-07-07 17:04:17 +02:00
cketti
e1d9a4779d Changed the rest of ImapStore to use longs for storing UIDs 2012-07-07 16:46:07 +02:00
cketti
2ad748fad7 Change ImapUtility to use 'long' for the values of sequence sets 2012-07-07 16:21:07 +02:00
cketti
a37c95b456 Move auto-unboxing out of if-clause 2012-07-07 15:41:55 +02:00
cketti
c359eb3cb7 Use auto-unboxing when iterating over a List<Long> 2012-07-07 15:36:43 +02:00
cketti
08c6c63b31 Merge branch 'pullreq153' 2012-07-07 15:06:41 +02:00
cketti
8493847895 Removed unused class 2012-07-07 14:29:40 +02:00
András Veres-Szentkirályi
d0c08fb705 removed unread private field mSecure 2012-07-06 15:04:46 +02:00
András Veres-Szentkirályi
9413cf5c9d Removed override merely calling super() 2012-07-06 14:35:01 +02:00
András Veres-Szentkirályi
bff1602da1 combined nested if statements in LocalStore 2012-07-06 14:35:01 +02:00
András Veres-Szentkirályi
961872edf0 combined nested if statements in ImapStore 2012-07-06 14:35:01 +02:00
András Veres-Szentkirályi
57f364ca69 combined nested if statements in MimeHeader.hasToBeEncoded 2012-07-06 14:35:01 +02:00
Joe Steele
102c6153a1 Issue 4359: IMAP message UIDs are 32 bit unsigned values and cannot be
stored in int, so we now parse them as long.
2012-07-05 18:00:49 -04:00
cketti
602ce7be99 Trim the first value in getHeaderParameters()
Previously a value like 'text/html ; charset="windows-1251"' for the
Content-Type header would not be decoded correctly.

Fixes issue 4348
2012-06-18 04:46:46 +02:00
cketti
67caa357fd Fixed loading messages from the database when message format is AUTO 2012-06-01 20:03:03 +02:00
cketti
116e9598da Create an HTML version of text/plain-only drafts in the database
Without this, text/plain-only messages with K-9 Mail's "identity header"
are displayed as "No text" (when moved out of the Drafts folder).
2012-06-01 16:15:07 +02:00
Romain Vimont (®om)
fb36389d20 Create database in a transaction (for performance)
On my emulator, it takes 70ms instead of 250ms.
On a very specific hardware, it takes 0,5s instead of 4,1s.

I willingly did not indent the code between my try/catch (for the patch to be readable).
2012-05-30 12:57:05 +02:00
ashley willis
7e5717ed81 use the new way on internal storage, or the original way otherwise 2012-05-09 21:09:10 -05:00
ashley willis
b1b6d5fce4 Yahoo! IMAP seems to no longer require 'ID ("GUID" "1")' over non-3G.
see http://mobile.yahoo.com/mail for IMAP setup instructions.
2012-05-09 13:48:36 -05:00
ashley willis
ca6d697eed fixed commit ed4c74983e due to crashing on 2.1 devices 2012-05-07 09:24:13 -05:00
ashley willis
9e1fa63139 fixed MimeHeader.hasToBeEncoded() to include TAB.
bug encounted when replying to a message such as:
From: "bar,	foo" <foobar@example.com>
the field was originally folded on the tab, but the CRLF was already stripped before this error.
2012-04-30 13:58:02 -05:00
ashley willis
ed4c74983e fixed security issue -- account databases previously world-readable and accessible to any app if UUID is known. 2012-04-26 08:03:06 -05:00
Andrew Chen
7e26b62227 Remove horizontal rules in message previews. 2012-04-08 16:52:55 -07:00
Jesse Vincent
85da3d8667 workaround to detect the charset from HTML mail without charset parameter on the header.
Conflicts:

	src/com/fsck/k9/mail/internet/MimeUtility.java
2012-04-08 12:38:45 -04:00
Jesse Vincent
4723ea0ae5 Possible to select email addresses from the ContactPicker
Conflicts:

	src/com/fsck/k9/activity/MessageCompose.java
	src/com/fsck/k9/helper/ContactsSdk3_4.java
2012-04-08 12:29:08 -04:00
cketti
0caac114a6 Added some error checks when processing IMAP FETCH responses 2012-04-03 07:55:52 +02:00
Koji Arai
10c37942a6 Added two domains handle docomo emoji 2012-03-17 23:24:12 +09:00
Koji Arai
f9fb74241a avoid NPE. address may be null when the parser is failed. 2012-03-17 23:23:27 +09:00
cketti
f9a35aeaee Replace CRLF with LF when loading drafts
This is necessary because we save the offset and length of the user-
supplied text in the identity header. These values are then later used
to split the draft in user text and quoted message.
When calculating these values we operate on a string with LF line
endings. Ideally we want to do the reverse operation on the same
string, but when saving the message to the server LF is converted to
CRLF to create RFC-conforming messages.

This is only a hack and will probably be the cause of more trouble in
the future. A better solution would be to make the identity header more
robust or get rid of it entirely.
2012-03-17 04:15:30 +01:00
cketti
3fa8081e88 Fixed MimeUtility.extractTextual() when loading messages from the server 2012-03-17 03:19:09 +01:00
cketti
dbf38dae65 Fixed the change of the previous commit 2012-03-17 00:30:40 +01:00
cketti
a48adafbbc Don't use null for 'text' and 'html' in ViewableContainer 2012-03-16 22:56:09 +01:00
cketti
f181e923ca Don't modify draft messages when storing them in the database 2012-03-15 21:21:00 +01:00
cketti
aeb0220e56 Fixed MimeUtility.getHeaderParameter() to not crash on unexpected input 2012-03-12 17:45:34 +01:00
cketti
0cb4207ef7 IMAP: don't create the destination folder when copying messages 2012-03-09 21:51:48 +01:00
cketti
7163d39091 Change ImapException to always be a permanent error
This way IMAP commands that get anything but an "OK" response are never
tried again (pending actions).
2012-03-09 21:50:26 +01:00
cketti
5591865f17 Merge branch 'uidplus' 2012-02-29 14:09:41 +01:00
cketti
e72afc1641 Set content type of attachment even when no file name was found 2012-02-27 23:20:30 +01:00
cketti
2cb31a2fac Added button to show unnamed and inline attachments 2012-02-27 21:45:46 +01:00
cketti
fbc187a3e2 IMAP: Send the Message-ID as quoted string in getUidFromMessageId() 2012-02-19 19:51:06 +01:00
cketti
4adfc51339 Use HtmlConverter.convertEmoji2Img() in LocalFolder.updateMessage() 2012-02-18 00:44:24 +01:00
cketti
b9803ece19 Fixed divider before text part with filename 2012-02-18 00:05:56 +01:00
cketti
8ce78408c2 Fixed HTML generation in MimeUtility.extractTextAndAttachments() 2012-02-17 19:42:35 +01:00
cketti
5083b8f1e8 Use newly imported AOSP code instead of ImapStore.parseSequenceSet() 2012-02-17 15:01:30 +01:00
cketti
deb01bcd16 Imported ImapUtility.java from AOSP Email
Modified it to fit our needs.
2012-02-17 14:59:50 +01:00
cketti
c3885bc475 Cleaned up LocalFolder.appendMessages() a bit 2012-02-16 23:52:44 +01:00
cketti
023c60513e Fixed UID mapping return value of LocalStore.moveMessages() 2012-02-16 23:37:44 +01:00
cketti
3e4e6c72fd Cleaned up ImapStore.ImapFolder.copyMessages() 2012-02-16 22:12:44 +01:00