Commit Graph

290 Commits

Author SHA1 Message Date
Apoorv Khatreja 80d99baf29 Implemented table lookup for mime type replacement (issue 873 and similar), added javadocs, moved to MimeUtility.java. 2011-03-25 05:46:11 +08:00
Jan Berkel a7a690e6ff Simplify getTextForDisplay() and fix a potential ClassCastException 2011-02-19 15:25:09 -05:00
Jesse Vincent 7cbbd72fac Astyle 2011-02-13 21:20:21 -05:00
Matt Johnston ae2c933181 Destroy all messages in one sqlite transaction 2011-02-11 15:30:50 -05:00
Jesse Vincent 7cd99bdfd2 When some message has an Application/octet-stream .jpg attachment, be a
bit more lenient and treat it as application/octet-stream, so we can
look up the content type by file extension
2011-02-07 20:34:08 -05:00
Jesse Vincent 12d1097a24 Big, scary massive "ant astyle" to get us back to something
approximating AOSP coding standards.
2011-02-06 17:09:48 -05:00
cketti d2561f19af Removed unused imports
git-svn-id: https://k9mail.googlecode.com/svn/k9mail/trunk@3270 9a7fa126-a48b-11dd-a887-7ffe1a420f8d
2011-02-04 23:19:07 -05:00
Dan Applebaum 40bdf99925 Fixes Issue 2934 Fixes Issue 2935
Provides for storing Folder Settings in the central Preferences
Storage as a back-up to the settings stored on each folder.  In this
way, even if the LocalStore DB is recreated or otherwise lost, Folder
Settings can be recovered.

1) Does not change the methodology used to read settings while
running, nor the changes in r3107 & r3116 which tremendously improve
Accounts list loading time.

2) Loads Folder Settings from Preferences and stores on the folder
only when creating a new LocalFolder

3) Saves Folder Settings to Preferences and the DB row every time the
Folder Settings are changed.

4) When upgrading from DB version 41 to 42 or later, copies all
settings for existing folders from the DB storage to the Preferences
Storage.

5) Transactional bulk folder creation and single pass local folder
existence check during "Refresh folders" operation drastically reduces
time spent when refreshing folders from the remote store.

6) Uses prepared statement during Editor commit to reduce Preference
storing time.

Probably needs a reversion of r3239, but I'm unfamiliar with
translations, so am leaving that to others' discretion.
2011-02-04 23:19:06 -05:00
Jesse Vincent 3d090e9626 astyle 2011-01-31 23:45:23 +00:00
Jesse Vincent 6550151684 Add serialVersionUID to Serializable classes to make eclipse happy 2011-01-31 23:45:14 +00:00
Jesse Vincent 4d5381f33d Turns out to be some code which tries to be clever about removing the
multipart envelope in LocalStore.java. It is thrown away if there is
just one item in the multipart. This breaks the display of attachment
only message, since the attachment is no longer detected by the code
which creates the view. I made a fix (see patch below) which checks if
the single item in the multipart is not a attachment.

        -- patch from wernermann29 at googlemail.com
2011-01-31 01:54:27 +00:00
Jesse Vincent 59b3c1ba89 Extract out the list of folder columns 2011-01-24 03:27:19 +00:00
Jesse Vincent 22f422ea29 Use a heuristic to try to avoid notifying POP3 users about older mail
messages
2011-01-24 03:27:14 +00:00
Jesse Vincent 24d03ce662 Deal with potential NPEs if folders aren't set up, as happens on new
accounts
2011-01-23 02:26:14 +00:00
cketti bcb1131cb5 Don't rely on FolderClass implementation details outside of FolderClass 2011-01-19 01:50:28 +00:00
cketti 72d2d24cec Fixed potential null pointer access 2011-01-19 00:13:58 +00:00
cketti 8279092070 Fixed lots of warnings (unused imports/variables, missing annotations, etc.) 2011-01-18 23:54:49 +00:00
Jesse Vincent 951dbcbd33 Set up some reasonableish defaults when creating folders 2011-01-18 00:04:24 +00:00
Jesse Vincent 65e89afc40 remove a duplicate codepath for folder insert 2011-01-18 00:04:17 +00:00
Marcus Wolschon 30767c3bd9 Fixed NullPointerExceptions 2011-01-17 10:28:58 +00:00
Jesse Vincent 6504d592ea Try harder not to use "special folders" as count sources 2011-01-17 04:06:34 +00:00
Jesse Vincent 890564b926 Missed a case for stats computation 2011-01-17 03:22:30 +00:00
Jesse Vincent 30fed01784 Replace the expensive part of Account.getStats() that loaded all folders
and iterated through them with a SQL query.
2011-01-16 21:33:58 +00:00
Jesse Vincent 76e1165fea we no longer need the special version of getDisplayClass 2011-01-16 21:33:39 +00:00
Jesse Vincent 5fb8b7c7e5 only do one preferences update per account when upgrading. Big perf
boost
2011-01-16 04:23:12 +00:00
Jesse Vincent 38ba071172 astyle 2011-01-16 04:23:08 +00:00
Jesse Vincent 4d0f489ab4 Initial implementation of folder attributes on the folder, rather than in preferences 2011-01-16 04:23:03 +00:00
Jesse Vincent cafa08fc6a generalize some repeated code 2011-01-16 04:22:59 +00:00
Jesse Vincent ab5c7ea6ff Refactoring of emoji transcoding code into the htmlconverter class 2011-01-15 15:25:48 +00:00
Jesse Vincent 4dcf32d2a9 Call the routine to convert emoji to images only when a message actually contains emoji.
This is to solve the performance issue repoted by jesse in Issue 2657.

Signed-off-by: HIRANO Takahito <hiranotaka@zng.info>
2011-01-15 15:25:42 +00:00
Andrew Chen e56b044bbc Add support for HTML composition with text alternative.
Revamp K9 Identity string.
Quote names in Address only when needed.
Remove quoted text bar and move button to quoted text area.
2011-01-12 23:48:28 +00:00
Jesse Vincent de806f7715 astyle 2011-01-06 16:55:08 +00:00
Andrew Chen ead632aac6 Refactor html/text conversions into its own class.
Add more tags to be ignored during HTML to plain text conversion.
Remove UTF-8 non-breaking spaces from generated text.
2011-01-05 04:26:33 +00:00
Jesse Vincent d25f12fa16 Switch K-9 from generating X-User-Agent to User-Agent headers.
Fixes issue 1917
2011-01-04 08:33:12 +00:00
Andrew Chen f3e75d564a Add custom HTML tag handler to be used when converting HTML to Text.
Hides code in STYLE and SCRIPT tags and adds text-equivalent of HR.
2011-01-04 06:58:13 +00:00
Jesse Vincent 0a8514888e Map emoji code points defined by mobile carriers to ones defined by
Google in order to support various carriers. Patch by HIRANO Takahito
<hiranotaka@zng.info>
2011-01-03 18:07:44 +00:00
Andrew Chen 68ded8aa3e Add some more documentation about temporary notification avoidance code using UIDs. 2011-01-03 03:26:31 +00:00
Andrew Chen e794af0bbf Prevent new mail notifications if they're older than our most recent message.
First attempt at fixing Issue 1276.  Only works with services that use numeric message IDs, like IMAP.
2011-01-02 09:01:23 +00:00
Andrew Chen 605a0bdc93 Add more comments about LocalTextBody.
Display decrypted PGP data as text/plain (content type was being set, but not being passed to WebViews).
2010-12-29 07:34:57 +00:00
Jesse Vincent 4c9c478d8d minor code and doc cleanups as recommended by IntelliJ 2010-12-28 09:10:50 +00:00
Jesse Vincent bbf65f1335 remove temporary variables 2010-12-28 09:10:30 +00:00
Jesse Vincent 7623a02852 lift the "get display text" code out of the messageview and into
localmessage
2010-12-28 09:07:39 +00:00
Jesse Vincent 9878b74379 astyle 2010-12-24 18:55:05 +00:00
Andrew Chen 2806c267c9 Remove unreadable characters from message previews. 2010-12-23 23:16:54 +00:00
Fiouz ab5caba92c Factor out store locking code in an intermediate DB access layer. 2010-12-18 22:56:40 +00:00
Fiouz c5f7dbf028 Execute LocalMessage.appendMessage() & LocalMessage.setFlag() in the same transaction for small message storing in order to speed up DB update.
This is a per message basis optimization. More improved speed could be attained by batching several messages in the same transaction.
2010-12-18 10:12:52 +00:00
Fiouz 0d23157e3b Don't reference the enclosing type instance when it's not used (memory optimisation) 2010-12-14 19:26:57 +00:00
Andrew Chen b0e4d9cdff Try calculating content preview from HTML part if text part is unsuccessful on appendMessages. 2010-12-13 00:33:00 +00:00
Jesse Vincent f5eb6e03af astyle 2010-12-01 06:32:29 +00:00
Jesse Vincent e44a74c652 Get rid of a whole lot of crazy code that forced repeated attachment
downloads with the intent of only having one attachment downloaded at a
time.
2010-12-01 06:04:28 +00:00
Jesse Vincent 75aa644a23 Remove a bunch of stringification inside of string appends (per intellij) 2010-12-01 03:06:50 +00:00
Jesse Vincent c79ea226a5 Remove "throws" declarations that didn't actually get thrown. Remove a
couple of try blocks that only caught throws we didn't throw. IntelliJ
optimization.
2010-12-01 03:02:13 +00:00
Jesse Vincent 81f12f0e05 clean up a couple null checks 2010-12-01 03:01:20 +00:00
Jesse Vincent 4f376e8332 astyle 2010-11-28 20:28:37 +00:00
Jesse Vincent 75108f4078 move toMe and ccMe into LocalMessage from MessageInfoHolder 2010-11-27 04:03:10 +00:00
Jesse Vincent f9981dcf7c lift hasAttachments to LocalMessage 2010-11-27 04:02:56 +00:00
Jesse Vincent 5d33bc044b when a message is seen _decrement_ the unread count, don't increment it 2010-11-21 05:31:42 +00:00
Jesse Vincent 14152a8585 Don't compare whether we're setting the delete flag with whether the
message is seen or not. (logic error)
2010-11-21 05:31:38 +00:00
Jesse Vincent 0e5b5de409 update our counts on destroy before actually destroying the message, so
we have something to call isSet on
2010-11-21 05:31:34 +00:00
Fiouz a67a2022d3 Added method name logging on transaction logging, when debug is enabled 2010-11-17 21:11:07 +00:00
Fiouz dc16657480 Made LocalStore.destroy() transactional 2010-11-17 21:10:45 +00:00
Jesse Vincent b6ccba9c7d When getting a list of folders out of the database, ask for it in
asciibetical order, rather than random order
2010-11-17 03:42:14 +00:00
Jesse Vincent 80e4de6db4 fix a deleted message count logic error 2010-11-15 01:31:20 +00:00
Jesse Vincent 4f4fe87d5f Minor refactoring of flag setting code 2010-11-15 01:31:16 +00:00
Jesse Vincent 36714d3b4a astyle 2010-11-15 01:31:11 +00:00
Jesse Vincent 675651286b Added the ability to completely wipe the localy cached messages of a syncced folder. 2010-11-14 00:49:25 +00:00
Jesse Vincent 0eee80f08b renamed deleteMessagesOlderThan to clearMessagesOlderThan to better
reflect that it just nukes local copies rather than the synced copies
2010-11-14 00:49:08 +00:00
Jesse Vincent 7d40596aa1 split apart "delete messages older than" for later reuse 2010-11-14 00:49:04 +00:00
Jesse Vincent 14055691a3 Merge branch 'mail-on-sd'
* mail-on-sd: (40 commits)
  Added more comments to explain how the locking mecanism works for LocalStore
  Fixed wrong method being called during experimental provider initialization (since provider isn't enabled, that didn't harm)
  Add more comments about how the various StorageProviders work and how they're enabled
  find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs
  French localization for storage related settings
  Remove unused SD card strings (replaced with storage indirection)
  Merge mail-on-sd branch from trunk
  Reset mail service on storage mount (even if no account uses the storage, to be improved)
  find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs
  Migraion -> Migration
  move the Storage location preference into preferences rather than the wizard.
  Made LocalStore log less verbose Added @Override compile checks
  Added ACTION_SHUTDOWN broadcast receiver to properly initiate shutdown sequence (not yet implemented) and cancel any scheduled Intent
  Be more consistent about which SQLiteDatabase variable is used (from instance variable to argument variable) to make code more refactoring-friendly (class is already big, code extraction should be easier if not referencing the instance variable).
  Added transaction timing logging
  Factorised storage lock/transaction handling code for regular operations.
  Use DB transactions to batch modifications (makes code more robust / could improve performances)
  Merge mail-on-sd branch from trunk
  Update issue 888 Added DB close on unmount / DB open on mount
  Update issue 888 Back to account list when underlying storage not available/unmounting in MessageView / MessageList
  ...
2010-11-13 21:40:56 +00:00
Jesse Vincent a8de2d0000 astyle 2010-11-13 01:47:08 +00:00
Jesse Vincent af5f78928c Add a "fetch all messages" visible limit 2010-11-12 23:41:43 +00:00
Jesse Vincent 478bd876ee There's no reason the getSubject accessor should throw a
MessagingException on LocalMessage
2010-11-12 22:27:32 +00:00
Jesse Vincent b2e5d7afc5 extract our our folder-count updating code from the flag setting code 2010-11-12 21:38:11 +00:00
Jesse Vincent eb908b67a3 try to clean up our message count update logic in flagging 2010-11-12 21:38:06 +00:00
Jesse Vincent 2d8a8998b0 factor out a "destroy" method for local messages 2010-11-12 21:38:02 +00:00
Jesse Vincent 33fd42e766 If we DELETE a message from the database, don't then try to UPDATE it 2010-11-12 21:37:54 +00:00
Jesse Vincent 69675bc935 Now that we can show bigger previews, actually generate a bigger preview 2010-11-05 04:23:09 +00:00
Jesse Vincent a78776a9ee Only look at the first 8k of a message when calculating message previews 2010-11-05 04:23:04 +00:00
Jesse Vincent bfc24a58a0 Improvements to message preview heuristics 2010-11-05 03:55:24 +00:00
Jesse Vincent d0e85ce43a astyle 2010-11-05 02:59:21 +00:00
Marcus Wolschon 4aba667a4e fix for "http:/"-links in plaintext -emails. (add http:// is a link has no schema) 2010-11-04 13:35:39 +00:00
Fiouz be6ab18091 Update issue 2537
Try to gracefully handle account DB corruption by deleting file on open exception
2010-10-28 19:16:55 +00:00
Jesse Vincent 983d7ad48f The "viewport" hinting we used to try to better fit messages by default
made android zooming incredibly unreliable. Now it's only somewhat
unreliable.
2010-10-23 18:50:10 +00:00
Jesse Vincent 4ea6c1603b We've been seeing a lot of FCs on htmlifcation of large messages due to
running out of memory during our heavy HTMLification. Try to be a bit
lighter on the poor RAM if a plain text message is big.
2010-10-23 17:33:08 +00:00
Jesse Vincent e8756af4f1 astyle 2010-10-21 20:49:20 +00:00
Jesse Vincent d02ddda19b When doing a message search, break it into "first 10" and "more" -
because a long SQL query takes more time before starting to return
results, K-9 was increasingly slow on large folders.

Doing two searches may take marginally more time but starts getting
results back to the UI much faster.
2010-10-21 20:48:28 +00:00
Jesse Vincent 496677dad4 Calculate preview for html-only messages
Fixes 2465
2010-10-16 08:27:47 +00:00
Jesse Vincent 28388b235e move "saveAllHeaders" to the account preferences screen. 2010-10-11 00:08:39 +00:00
Jesse Vincent 8c1eda3149 An attempt at cleaning up after the 3.00x and earlier bug that caused
K-9 to leave old headers hanging around in the database
2010-10-08 06:33:04 +00:00
Jesse Vincent 6061c42ea9 find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs 2010-10-05 06:04:28 +00:00
Fiouz ef1d958092 Optimization: don't invoke Cursor.getXXX(int) more than necessary 2010-10-02 18:45:51 +00:00
Jesse Vincent b6124fb397 deleteHeaders deleted message headers by id when it should have been
deleting by message_id.  I believe this was our last serious leak in
our flash storage

deleting message headers was....just wrong. we've fixed other similar
bugs inherited from android 1.0 before.
2010-09-22 02:46:20 +00:00
Jesse Vincent 7030967fa7 astyle 2010-08-31 03:58:33 +00:00
Jesse Vincent 7d2804549e Remove redundant "return" statements from the end of void methods (with
help from intellij)
2010-08-29 23:39:45 +00:00
Jesse Vincent 4f0bce1569 Simplify many, many boolean conditions with help from IntelliJ 2010-08-29 23:39:26 +00:00
cketti 3d27cf220a Removed some code/string duplication. 2010-08-29 18:46:51 +00:00
Jesse Vincent 89dcc3646b Database version bump to clear bogus cached attachments 2010-08-29 16:58:04 +00:00
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