Commit Graph

143 Commits

Author SHA1 Message Date
Jesse Vincent 6031862bad Before we delete messages earlier than the earliest acceptable date, make sure we also delete their attachments. 2010-08-29 16:57:57 +00:00
Jesse Vincent fe62812ff2 Delete the attachments from disk before we delete them from the database, so we know what to delete. 2010-08-29 16:57:49 +00:00
Jesse Vincent 994ed6653c simplify some of our flagging logic and remove duplication using ternary operators 2010-08-29 16:57:40 +00:00
Jesse Vincent 6d38c1c71a Comments to better explain what's really going on on delete of messages 2010-08-29 16:57:31 +00:00
Jesse Vincent a5b7aa97dd typo fix 2010-08-29 16:57:24 +00:00
Jesse Vincent 7300aca2b8 Remove a call to deleteHeaders since headers are deleted implicitly by
an SQLite trigger.

Call our new variant of deleteAttachments() to avoid an extra lookup
2010-08-29 16:57:02 +00:00
Jesse Vincent 31613e15c7 extract the method for "delete a message" from the "Set flags" method 2010-08-29 16:56:54 +00:00
Jesse Vincent 54a4c84afa Split out deleteAttachment to avoid an extra SQL call if we can. 2010-08-29 16:56:45 +00:00
Jesse Vincent ff5024eaec astyle 2010-08-18 02:48:55 +00:00
Koji Arai 7964c34dbd Fixes issue 2145
Cannot show the emoji icon on Android 1.6 at least. Replaced all "< img" to "<img".
2010-08-15 14:52:59 +00:00
Jesse Vincent 73c3872dd0 Improve our display of inline images in HTML mail to not also offer
themselves up for download.

To do so, we need to start storing the original content-id and
content-disposition for attachments - this includes a database upgrade.

Based on a patch from @achen.code
2010-08-15 02:37:06 +00:00
Jesse Vincent a0238904b6 Update our emoji implementation to support docomo, softbank and kddi
(with the exception of 3 kddi glyphs that overlap with softbank).

As of this commit, emoji sent by iPhone users are visible in K-9
2010-08-12 02:22:35 +00:00
Fiouz dfb8f9e0f2 Memory management optimisation: help garbage collection by avoiding repeated instantiations of immutable arrays (empty arrays of String, Message, Flag, Address) 2010-08-07 15:10:07 +00:00
Fiouz 44cef83e0b Use of constants for immutable empty arrays (prevent useless memory allocation) 2010-08-02 11:55:31 +00:00
Jesse Vincent cd6b64d88f Experimental changes to tell WebView that the HTML versions of messages
we generate from ascii are "mobile-optimized"
2010-08-02 01:27:50 +00:00
Jesse Vincent a4381696f9 Support Emoji for DoCoMo.
Emoji icons are derived from http://start.typepad.jp/typecast/
2010-08-02 01:24:40 +00:00
Jesse Vincent 766a115155 Remove URLs from message previews. Suggested by Kevin Falcone 2010-07-24 02:09:12 +00:00
Jesse Vincent f492ee9d0b back out the rest of my localDate changes for now due to user
complaints.
2010-07-15 03:47:45 +00:00
Jesse Vincent 70a1eef943 astyle 2010-07-13 21:16:56 +00:00
Koji Arai 28d3967d0f Fixes issue 305
Support Content-Id header to show inline images.
2010-07-11 13:44:16 +00:00
Jesse Vincent 61b25c8760 only store an internalDate if we actually get it from the server; If we
don't have an internaldate, use the sentdate for sorting comparisons.
2010-07-10 16:40:34 +00:00
Koji Arai dab0c9a97f Fixes Issue 1914
Show To, Cc and From headers on the part of additional headers without fetching all headers.
2010-07-02 14:57:55 +00:00
Jesse Vincent 421ecac997 Strip PGP headers from message preview 2010-06-06 22:28:29 +00:00
Jesse Vincent 4bfebe42f1 Allow users to choose whether they want plaintext messages to be
fixed-width when uprezzed to HTML.
2010-06-06 21:33:33 +00:00
Jesse Vincent 0624f119df Gr. typo to my "word character" regex 2010-06-06 21:33:15 +00:00
Jesse Vincent 222808b51d Bump up preview length from 160 to 250 to make better use of larger
displays
2010-06-06 21:33:05 +00:00
Jesse Vincent 18cf923072 Only strip : lines containing word characters. This should improve the
preview when someone sends mail starting with a time. (12:01)
2010-06-06 21:32:57 +00:00
Daniel Applebaum b35f807820 Fixes Issue 227
Provide for controlling the maximum age of syncrhonized messages.
Efficient with IMAP, much less efficient with other Stores.
2010-05-30 21:20:47 +00:00
Daniel Applebaum dedfd026be Fixes Issue 254
Provide for only showing folders that are subscribed on the server
(IMAP only)

Also:
Change default for Notification behavior to the old way.  Make going
to the search for unread messages off by default.

Fix up some hiding of labels, etc. on the incoming server settings.

Check for message suppression in search results.
2010-05-30 16:56:50 +00:00
Jesse Vincent 1a66072910 find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs --unpad=paren 2010-05-30 04:17:00 +00:00
Jesse Vincent 49c4a4f97c refactor search code to allow us to search on specific fields. 2010-05-29 21:56:17 +00:00
cketti c5486469c2 - Add menu item to show additional headers in the message view
- Add option to save all headers locally (incoming server settings)

Applied patch provided by timmlinder with small modifications.

Fixes issue 43
2010-05-21 15:34:29 +00:00
cketti 6e3183f54f Moved classes Regex and DomainNameChecker from android (package) namespace to K-9 namespace. This way we're protected from modifications to these classes in future Android versions. 2010-05-19 19:16:36 +00:00
cketti 58b8479612 Code refactoring:
- Created "controller" and "mail.filter" package
- Moved a lot of classes to new/other packages
- Removed unused classes: NoSuchProviderException, MessageDateComparator
2010-05-19 18:17:06 +00:00
Jesse Vincent ecebdf18cd find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs --unpad=paren 2010-05-15 19:46:16 +00:00
Daniel Applebaum 8b92bc3836 Fixes Issue 1474
Fixes Issue 1562

Issue 1474:
Provide new facility to totally wipe all data for an account but leave
settings intact.  This is useful because sometimes storage is so full
that SQLite cannot perform the usual VACUUM or message deletion.

Add confirmation dialogs to destructive Clear and Recreate operations.

Remove destructive Clear from FolderList so as not to have to
duplicate the confirmation dialogs.

Issue 1562:
Suppress notifications when new messages arrive in Trash, Sent or
Drafts special folders.
2010-05-12 04:17:52 +00:00
cketti 37b42f58a6 Fix error handling code in DB upgrade. 2010-05-10 00:14:26 +00:00
Daniel Applebaum 989e89f5b0 Fixes Issue 1048
Zero out unread and flagged counts on all folders in an account being
cleared.
2010-05-02 05:37:48 +00:00
Jesse Vincent 8af7f4a7b6 find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs --unpad=paren 2010-04-29 04:59:14 +00:00
Daniel Applebaum 6cfcfb953f Aggressively get rid of obsolete Flag X_NO_SEEN_INFO. It was
interfering with "unread" searches on POP3 accounts.

Flags really should be normalized in the database to eliminate the use
of LIKE while searching by Flags.
2010-04-25 06:17:15 +00:00
Daniel Applebaum 41c5dc5986 Fixes Issue 1448
Fixes ClassCastException.

Also:
Envelope and star in Accounts Activity are now both "hot".  Tapping
the main part of the search opens the full search; tapping the
envelope opens the search only for unread messages; tapping the star
opens the search but only for starred messages.

The envelope and star are a bit small to reliably tap.  Both options
should be available via long-press, also.

Methodology will be extended to real accounts, as well.
2010-04-22 02:20:35 +00:00
cketti 57acdb7033 Create 'folders' table with 'flagged_count' field when installing K-9 Mail. Previously it was only added when updating the application. 2010-04-17 21:27:06 +00:00
Daniel Applebaum 664c4d6a78 Fixes Issue 1394
Computing the account size is pretty slow for big accounts, and making
this functionality optional should be considered.

Also, displays the number of flagged messages ("stars") in each
account in the Accounts list and each folder in the FolderList.  Needs
better presentation of the flagged message counts, but this works as a
proof-of-concept and gets the data structures built.
2010-04-16 14:33:54 +00:00
cketti 57cc4cd735 Code cleanup. Fixed lots of warnings reported by Eclipse.
- Removed unused imports
- Removed unused variables/code
- Parametrized raw types
- Added @Override annotations
- Added hashCode() when equals() was overriden
2010-04-16 12:20:10 +00:00
Daniel Applebaum 9a8126d89c Addresses Issue 1348 and Issue 95
Not done, yet, but available for developers to use.

Definite things to be done in the short term:
1) Allow user to hide canned searches in Accounts Activity
2) Make newly arrived mail immediately appear in search results.

Possible improvements:
3) User-definable searches
4) Make newly deleted mail immediately disappear search results.
5) Make message with flag changes immediately appear/disappear from
   search results.
6) Show search result size in Accounts Activity.
2010-04-06 02:54:48 +00:00
Daniel Applebaum f0808fb3e0 Fixes Issue 1291
Provides for the user to elect to have certain folders displayed first
in the FolderList.  Folders so elected are displayed in alphabetical
order first, then folders not so elected are displayed alphabetical
order.

No special handling is done for Inbox any more, except that it is in
"top group" by default, to preserve current behavior until the user
changes the settings.
2010-03-07 17:02:21 +00:00
Daniel Applebaum c0e4220b82 Fixes Issue 1116
Fixes Issue 1278
Fixes Issue 119
Fixes Issue 1077
Fixes Issue 1238

Worked performed by danapple0 and cketti in
https://k9mail.googlecode.com/svn/k9mail/branches/issue1116

Add support for most batch ops (except move and copy) in search
results.  Add support for batch move and copy on real folders.

Increase efficiency of bulk IMAP moves and copies by doing as multiple
UID operations.

Eliminated serialization of Account objects.

Provide up-references in useful places to make all future code cleaner
and more efficient.

Fixed a bunch of draft handling

Merged from issue1116 branch, except for Account.java, which was
copied wholesale.  Account.java was manually merged in issue1116
branch at r1489

svn merge -r 1459:1489 https://k9mail.googlecode.com/svn/k9mail/branches/issue1116 .
cp ../issue1116/src/com/fsck/k9/Account.java src/com/fsck/k9/Account.java
2010-03-04 04:00:30 +00:00
Jesse Vincent f9d39e4814 Back out Attachments-on-SD support (it's on a feature branch now, while
Bao-Long makes it extra-awesome)

This commit should revert:
r1445
r1437
r1436
r1449
r1442
r1441
r1419
r1414
r1413
2010-02-18 03:28:31 +00:00
Bao-Long Nguyen-Trong e435d9d616 Fixed issue 1205: Attachment storage location setting now takes effect immediatly. LocalStore is also better at handling when attachment are stored in a mix of internal and external storage (migration state after a setting change) 2010-02-13 19:07:10 +00:00
Bao-Long Nguyen-Trong 6fe2dad5cc Added some defensive code to prevent crashes caused by the LocalStore getting in a bad state due to issue 1205 (still being worked on). This fixes issue 1214. 2010-02-11 21:16:37 +00:00
Bao-Long Nguyen-Trong 131280c3f2 Still init LocalStore.mExternalAttachmentsDir even if sd card is not ready so that the object does not end up in a bad state 2010-02-07 05:58:04 +00:00
Bao-Long Nguyen-Trong 8403a265d9 We still need to be able to instanciate the LocalStore when the sd card is not mounted. So we do no throw an exception then. Exception will be thrown when we try to do attachment related things 2010-02-06 15:44:21 +00:00
Bao-Long Nguyen-Trong 55dac7ee4e Added option to have attachments store on sd card
(this is still a rough implementation)
2010-02-06 15:22:59 +00:00
cketti c6d29cb10e Fixes issue 21 (All messages are turned into multipart messages) 2010-02-03 19:56:20 +00:00
Jesse Vincent ff390b388a Bullet-proofing for database upgrades and better fallback for failures 2010-01-24 20:41:04 +00:00
Jesse Vincent 22e771ef2a Disable our not-so-hot preview generation as part of database upgrade
for now. it took a long time and got mediocre results.
2010-01-17 22:54:08 +00:00
Jesse Vincent 64469e4b4e ran artistic style against src/com/fsck/k9/ 2010-01-14 01:07:28 +00:00
Jesse Vincent 5617b629d3 Added a "preview" column to messages containing a brief summary of the message 2010-01-13 03:36:36 +00:00
Bao-Long Nguyen-Trong f965417479 Exclude deleted messages from search results 2010-01-12 00:59:13 +00:00
Daniel Applebaum e0b98cac21 Correct Exception text 2010-01-09 19:49:54 +00:00
Daniel Applebaum 2b37fe6864 Restore long-lost debugging line 2010-01-06 03:44:23 +00:00
Jesse Vincent 6caec1100c Incorrect (and ancient code) would accidentally clobber the wrong attachment
(and only one, rather than all) when deleting a message.
2010-01-03 23:23:13 +00:00
Jesse Vincent 63b6f6bf62 Refactoring to better propagate "folder" along with messages as they're instantiated 2009-12-27 17:22:26 +00:00
Jesse Vincent 70f35a537e If we loaded a message from the local store without an associated folder, load up its folder. 2009-12-27 16:53:51 +00:00
Jesse Vincent da45b81866 minor query reformatting 2009-12-27 16:53:45 +00:00
Jesse Vincent 580a562085 Lift the generic getMessages and searchForMessages up to the "store"
level from the "folder" level so we can search for messages across
folders
2009-12-27 16:53:37 +00:00
Jesse Vincent 6dcb10add6 Lift our column list for "load messages" out to the LocalStore, as the
first part of lifting "get messages" out of "folder" for search
2009-12-27 16:53:31 +00:00
Jesse Vincent 09ecd2bc9a Make it possible to instantiate a localFolder by id. 2009-12-27 16:53:16 +00:00
Jesse Vincent 47b338fb94 Move message population to the message class. 2009-12-27 16:52:57 +00:00
Jesse Vincent 151ae5a2a3 First pass at adding "Searchable" infrastructure 2009-12-27 16:50:37 +00:00
Jesse Vincent 9ba102599f Fix SQL statmeent 2009-12-27 16:50:28 +00:00
Jesse Vincent 9bcc991ec8 Extract out the code to "load mesages from SQL" from inside our "load messages in this folder" code 2009-12-27 16:50:21 +00:00
Jesse Vincent 9796cb6487 First rouind of extracting the "load messages from the db" column list 2009-12-27 16:50:14 +00:00
Daniel Applebaum 41d7ca51a3 Implementation of complete IMAP two-phase "delete/expunge" behavior.
On each IMAP account, the expunge behavior can be set to expunge
messages in a folder as soon as a move or delete is performed on the
folder ("immediately"), each time the folder is polled, or only when
executed manually.

In the Message List, there is now an Expunge action in the option
menu.

In the Folder List, there is now an Expunge action in the context
menu (long-press on the folder).

For IMAP accounts, it is also possible to disable the copying of deleted messages to the
Trash folder, by setting the Trash folder to -NONE-.

Fixes Issue 536.

Separately, in WebDAV accounts, the user can now choose the
server-side equivalents of the special folders, just like for IMAP.
2009-12-20 23:13:49 +00:00
Jesse Vincent 3914a78b53 xargs astyle --style=ansi --mode=java --indent-switches \
--indent=spaces=4 --convert-tabs --unpad=paren
2009-12-20 05:41:43 +00:00
Jesse Vincent 83409d78fa remove a bunch of debug logging that was cluttering production logs 2009-12-18 03:46:46 +00:00
Jesse Vincent 3f841d1494 removing debugging messages 2009-12-18 03:46:05 +00:00
Jesse Vincent 85b4c43e10 Revert "Initial implementation of loading only 25 rows from the message list"
This reverts commit 7056cb918e3bc71465053bff4070b8d3b28761a7.
2009-12-16 05:26:21 +00:00
Jesse Vincent a1302afe75 Initial implementation of loading only 25 rows from the message list
from SQLite at once. The hope is that this will improve perceived
performance on large folders by starting message display sooner.

In the case of a background sync while we're loading, we _may_ end up
doing more work than necessary, since we implement paging by "date
received"
2009-12-15 02:52:01 +00:00
Jesse Vincent 7b811e45a1 lazify loading of message headers in LocalFolder, since they're not needed in most of our use cases. 2009-12-15 02:51:18 +00:00
Jesse Vincent f31b2702a4 Massive rename to K9, step 1.
Conflicts:

	src/com/android/email/Email.java
2009-12-15 02:50:53 +00:00
Jesse Vincent eedfc0a839 step 1 of rename 2008-12-16 23:07:33 +00:00
Matthew Brace f273805ee3 Added user preference for the display limit of messages. The display limit is also used for the visible limit increment. If no limit is specified, the default limit is used. The limit is also account specific and not global. 2008-12-11 05:25:59 +00:00
Richard Tibbetts 6cd5ce7dee Fix similar empty-cursor bug when creating a folder on open.
Turn tabs into spaces in code I changed last commit.
2008-11-02 03:56:13 +00:00
Richard Tibbetts 4f798ae9cc Fix local folder query to not die when there are no local folders, like on first install 2008-11-02 03:28:29 +00:00
Jesse Vincent 5feb435b0f removing that empty call to the heavy query helps performance even more. 2008-11-01 22:24:15 +00:00
Jesse Vincent 046943b340 Remove O(n) deep SQL queries per folderlist by cleaning up the folder "exists" check on Local message stores
* Replace the extra SQL query before each folder 'open' with an exception if the open fails. (Optimize for the common case, not the exception)
2008-11-01 21:36:23 +00:00
Jesse Vincent 5491dee81b Damn it. Weird symlink-in-checkout bug. There goes our commit history. Sorry, all.
Guess I should go back to svk
2008-11-01 21:32:06 +00:00
Jesse Vincent 12c6e53141 bin directory should never have been checked in 2008-11-01 21:23:45 +00:00
Jesse Vincent 416aafb940 extract the 'upgrade database' method. Since K-9 never had a pre-v18 database, I'm inclined to kill it, except it may serve as a useful template for the future 2008-11-01 04:26:03 +00:00
Jesse Vincent c7de66484d more renaming. 2008-10-28 02:14:16 +00:00
Jesse Vincent c00ec35921 Grand insane rename, step 3 2008-10-28 01:22:17 +00:00
Jesse Vincent 7051cf8cc0 move step 2 2008-10-28 01:19:57 +00:00