Commit Graph

143 Commits

Author SHA1 Message Date
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