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

1214 Commits

Author SHA1 Message Date
Jesse Vincent
e8fd9683e6 Optimize the new return-to-listview code. (Avoid a bug where we do far
too much work on first open of a message list)
2010-10-11 19:47:41 +00:00
Jesse Vincent
d07aca3008 "Preferences" -> "Settings" for consistency 2010-10-11 14:54:23 +00:00
Jesse Vincent
c5d68fb49d Add preferences to enable pinch-to-zoom and single-column layout for
messages
2010-10-11 14:54:15 +00:00
Jesse Vincent
5fc78b4219 astyle 2010-10-11 00:08:54 +00:00
Jesse Vincent
a683186f6e move 3 IMAP preferences out of the "wizard" flow to an advanced page
where they belong
2010-10-11 00:08:47 +00:00
Jesse Vincent
28388b235e move "saveAllHeaders" to the account preferences screen. 2010-10-11 00:08:39 +00:00
Jesse Vincent
777c3e28b5 Disable theme in preferences to work around an android bug 2010-10-10 19:29:15 +00:00
Fiouz
296ab4f2be Update issue 1623
Message retrieval:
- Use the given projection for the cursor result instead of always using a predefined projection. Extraction logic is now in dedicated classes for easy extension.
- Added BaseColumns._ID & BaseColumns._COUNT columns.
- Deprecated "id" column since it's not a reliable identifier (it's an incremential value generated at query() time)
2010-10-09 09:19:24 +00:00
cketti
3503355b2e "Reply after quote" preference wasn't persisted. 2010-10-09 03:17:59 +00:00
cketti
385c34e190 Refactoring
- Moved ListPreference helper functions from FontSizeSettings to K9PreferenceActivity
- Used helper functions in Prefs
- Reordered preferences in Prefs to match the order in global_preferences.xml (display order)
2010-10-09 01:05:29 +00:00
cketti
96f18734f4 Minor rename 2010-10-09 00:48:46 +00:00
cketti
da7210d1db Refactoring: Some variable, method, and id renaming. 2010-10-09 00:38:52 +00:00
cketti
7028a4c167 Fixes issue 2144
- Removed the contact names cache (memory leak)
- Changed Contacts.searchByAddress() to Contacts.getNameForAddress(). Cursor is now immediately closed.
- Only try to resolve contact names when "Global settings" -> "Show contact name" is checked
- Never resolve contact names if number of recipients exceeds a threshold
2010-10-09 00:24:43 +00:00
cketti
4f429ec3bc Update issue 2144
Forgot to actually save the value when leaving global settings.
2010-10-09 00:13:46 +00:00
cketti
23b53bd660 Update issue 2144
Added option to show names from contacts to global preferences (value isn't used yet).
2010-10-08 23:50:33 +00:00
Jesse Vincent
72cb0bf7ec remove debugging statement 2010-10-08 06:56:50 +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
ccc9a99d94 make batch buttons behave correctly if the last selected item is deleted
while in a messageview
2010-10-08 06:18:45 +00:00
Jesse Vincent
b0de9913e0 more correct list updates after restore 2010-10-08 06:18:30 +00:00
Jesse Vincent
7881039cbf astyle 2010-10-08 05:34:46 +00:00
Jesse Vincent
945bccd633 First pass at a sane "restore list state" behavior when going back to a
messagelist from a message view
2010-10-08 05:34:33 +00:00
Jesse Vincent
78f797dda8 A previous refactoring broke notification for messages from the user by
replacing  a localized string with substitutions with a concatenation
in one of two places the string was used.
2010-10-08 05:09:38 +00:00
Fiouz
6feb483f36 Update issue 1623
Restored accidently dropped content resolver notification code (dropped during r2397 refactoring)
First pass at documenting exposed fields
2010-10-06 20:14:33 +00:00
Fiouz
f858c72482 Added @Override compile check 2010-10-06 17:51:35 +00:00
cketti
9b5436d23b Removed (redundant) debug logging from the IMAP parser code. 2010-10-06 01:50:02 +00:00
Fiouz
548e6e7c77 Update issue 1623
Don't export the formatted date through the content provider: now exported as the raw Epoch value - date formatting is a UI concern. That makes MessageInfoHolder lighter.
2010-10-05 22:33:20 +00:00
Fiouz
58c80ad096 Update issue 1623
Added semaphore to prevent third party content resolver from exhausting K-9 resources: it won't allow more than 1 cursor to be active at the same time. Concurrent threads (other content resolver invocations) will be suspended until the previous cursor gets released.
2010-10-05 20:23:07 +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
Jesse Vincent
58bb54a588 when quoting an html body part for forwarding, downrez it to plain text.
In the glorious future, we should be forwarding as an attachment. but
this is better than the previous behaviour
2010-10-05 06:04:16 +00:00
Jesse Vincent
ae53a0c5ff broke addAttachmentView into its own sub 2010-10-05 06:03:51 +00:00
Jesse Vincent
524350a960 Replace our (incomplete) custom MIME type list with a call to webkit. 2010-10-05 06:03:24 +00:00
Fiouz
4d24101e13 MessageProvider:
- Prevented from handling queries while K-9 isn't ready
- Added more log output
2010-10-05 05:09:17 +00:00
cketti
00ffc4f7fe Reverted "shortcut" to global settings in menu for search results (message list) as this led to display problems with Android 2.2.
Fixes issue 2347
2010-10-04 00:01:59 +00:00
Fiouz
a3f4429963 Switch to UNIX EOL style 2010-10-03 11:08:42 +00:00
Fiouz
f1d413ce77 Optimization: extracted populate() outside MessageInfoHolder in order to properly cache DateFormat (avoid useless DateFormat costly lookup at each population) 2010-10-03 10:56:16 +00:00
Fiouz
9347409e14 Changed case of CheckboxListPreference class to match the Android framework naming pattern 2010-10-03 09:26:30 +00:00
Fiouz
8bb6eb146b Optimizations:
- Don't instantiate an empty Address array just to throw it away (less gabarge collection)
- Use a StringBuilder rather than a StringBuffer (faster as it isn't synchronized)
2010-10-03 08:28:56 +00:00
Fiouz
ef1d958092 Optimization: don't invoke Cursor.getXXX(int) more than necessary 2010-10-02 18:45:51 +00:00
Fiouz
75984939d1 Don't embed helper instance inside a data transfer object (ideally, the populate() method should be moved outside that DTO to an external service/helper) as this might lead future development to introduce unwanted dependency graphs (= memory leaks) 2010-10-02 09:07:14 +00:00
Fiouz
bb64a0ab01 Update issue 2379
Status: Fixed
Extracted Intent.ACTION_SENDTO handling in a separate block to extract data from URI (as opposed to ACTION_SEND which uses Intent extras to pass data)
2010-10-02 08:14:12 +00:00
Fiouz
f6064ff19f Use a thread pool to optimize resource usage instead of always firing up new threads (less garbage collection).
Note: this is not a complete revert of r2153 since the pool is now automatically expanded as needed (different implementation).
2010-10-02 07:45:11 +00:00
Fiouz
71dbdf3417 Update issue 1623
Removed dependency from K9 to MessageProvider (and added ability for components to register themselve for being notified when K9 instance is ready)
Moved Intent broadcast code from MessageProvider to K9
Made query() easily extensible using strategy pattern, the discriminant still being the Uri path
2010-10-01 19:41:39 +00:00
Fiouz
01f961c058 Update issue 1623
Fixed severe design flaw where the message provider would accumulate messages, causing an OutOfMemoryError even when the message provider isn't explicitely invoked.
query() is now synchronized with message retrieval
2010-09-26 16:01:41 +00:00
Koji Arai
2a39cd5206 Fixes issue 2282
Added an option whether the registered name color is change or not
Avoid "Connection error" when MessageView is opened. The contacts.getName() might return null.
2010-09-26 14:39:52 +00:00
Jesse Vincent
a2fe3bda34 When a new mail alert is alerting about a specific mailbox rather than
inbox, default to having it open that mailbox.  Patch from thardie
2010-09-22 15:43:43 +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
Fiouz
4cb2d52c9c Refactored message sorting code by extracting the sort code from the sorted object (this was a bad design, worsened by the MessageProvider patch). Ideally, new Comparator classes should get promoted to top-level classes and not be enclosed in MessageList.
Subject stripper backported from issue258 branch (Utility.java)
The result is a cleaner MessageInfoHolder class.
2010-09-21 22:12:45 +00:00
Marcus Wolschon
9ef306413b MessagingController not propagating provided listener 2010-09-20 11:47:02 +00:00
Fiouz
0990609727 Don't forget to remove some Preference entires when deleting Account 2010-09-19 21:10:56 +00:00
Fiouz
e28e6d8817 Added ability to disable LED notification for new messages (new account setting)
Extracted notification related settings in separate class (see Issue 2268)

Update issue 371
Status: Fixed
Added ability to disable LED notification for new messages
2010-09-19 20:54:43 +00:00
Fiouz
e16a79d08c Javadoc comment 2010-09-12 06:11:08 +00:00
Fiouz
c8a5de7abd Intent.ACTION_SENDTO.equals(action) was tested twice in the same if/else if statement causing the last one to never match, removed the first one in order to properly enable intent-based activity population
Fixes issue 2110
"Intent.ACTION_SENDTO.equals(action)" removed from first condition
See r1712
2010-09-12 05:26:13 +00:00
Fiouz
bbd664ad3c Optimization: don't use bytes and related byte/char conversion when we're actually working on string only 2010-09-11 11:20:50 +00:00
cketti
8cf2655dd8 Reverted r2332 and r2333 because the cause of the problem reported in issue 2078 seems to be different than initially thought. 2010-09-09 23:52:06 +00:00
Fiouz
5aa56e1569 Code cleaning: remove unused imports/variables 2010-09-04 06:57:25 +00:00
Jesse Vincent
3291c585e8 Improve Volume navigation settings, fix a bug when a list view is in
touch mode.

Patch by fiouzy.
2010-09-03 21:41:32 +00:00
Fiouz
de31886f44 Fixes issue 2230
Owner: fiouzy
Synchronize access to designated list to prevent concurrency issue
2010-09-03 20:32:12 +00:00
cketti
a85ea2ee53 - Reworked the previous patch with suggestions by jessev to be as runtime/memory efficient as possible without being useless.
- Output debug message when invalid responses are encountered.
2010-09-03 15:32:25 +00:00
cketti
b9b15295cd Added yet another work-around for an IMAP server implementation with a creative interpretation of the specification. Sanity check results returned for a SEARCH command.
Fixes issue 2078
2010-09-03 13:58:09 +00:00
cketti
9d9e669d65 Code cleanup 2010-09-03 02:15:57 +00:00
cketti
b44bed2596 Fix NullPointerException
Fixes issue 2261
2010-09-03 01:16:41 +00:00
cketti
0c27a1ab0e Avoid division by zero.
Fixes issue 2259
2010-09-03 00:56:19 +00:00
cketti
525d9a2ef9 Don't choke on malformed UIDL responses (POP3).
Fixes issue 2252
2010-09-02 23:59:20 +00:00
Jesse Vincent
6573f27cec do our messagelist updates from sync on the ui thread rather than the
sync thread. copy the incoming message list to deal with concurrent
access issues.  Patch by cketti++
2010-09-02 03:45:16 +00:00
Fiouz
08f10f1fe5 Issue 1711 (don't display subject when phone locked)
Modified code so that subject is still visible after unlock when notification bar is expanded
2010-09-01 22:37:11 +00:00
Fiouz
f43db5235c Fixes issue 1711
Owner: fiouzy
Don't display message subject in notification bar when keyguard is active (system locked)
2010-09-01 22:26:36 +00:00
Fiouz
f21d86d8ce Fixes issue 1945. Toast debug location when enabling debug logging. 2010-09-01 21:27:11 +00:00
Fiouz
9b285ae3fc Fixes issue 939
Heavily inspired from Gmail implementation. Currently implemented only for MessageView delete operation.
2010-09-01 20:59:09 +00:00
Koji Arai
842a5ee123 Update issue 2144
Use setSpan() instead of Html.fromHtml()
Should clear cached name of contacts at MessageView#onClickSender().
2010-09-01 01:35:20 +00:00
Jesse Vincent
a83fd2d548 Kill an insanely chatty log message 2010-08-31 05:01:26 +00:00
Jesse Vincent
a1496bd839 Revert the clever runonuithread hack from the previous commit, as it
leads to concurrent modification exceptions. "oops" :/
2010-08-31 04:29:56 +00:00
Jesse Vincent
7030967fa7 astyle 2010-08-31 03:58:33 +00:00
Jesse Vincent
7bd8fc3599 When we sync messages and are displaying a messagelist, do the listview
updates on the UI thread rather than the sync thread. This is a huge
performance boost (based on simple empirical testing) for initial syncs
as we now do more work as we add messages to message lists
2010-08-31 03:57:02 +00:00
Jesse Vincent
db1b86a296 Better visibility toggling as k-9 switches between messages in
MessageView
2010-08-31 03:55:30 +00:00
cketti
7f72da93e0 Added missing bit of achen.code's patch for issue 2211 (reply below quote) 2010-08-30 21:27:07 +00:00
Koji Arai
b1074329e4 On the MessageList and the MessageView, prefer to use the display name registered in the Contacts rather than raw addresses.
Update issue 2144
2010-08-30 14:37:34 +00:00
Koji Arai
e5c4f35737 Correct loading the alternated font size preferences. 2010-08-30 14:14:43 +00:00
Jesse Vincent
4bf233fba5 next and previous were reversed from K-9's standard interpretation of
them in the previous patch to add volume button navigation
2010-08-30 03:05:41 +00:00
Jesse Vincent
12eb866370 Remove a temporary variable 2010-08-30 02:16:38 +00:00
Jesse Vincent
65f0d22355 Add Volume button navigation in MessageView, MessageList and all
K9ListActivity subclasses.

The MessageView code is a patch from paulkilroy@gmail.com.

Fixes Issue 2112
2010-08-30 02:16:20 +00:00
Jesse Vincent
0f1a1baa89 Add a preference to use volume up / volume down to navigate items.
From a patch by paul.kilroy@gmail.com. Partial resolution of Issue 2112
2010-08-30 02:15:59 +00:00
Jesse Vincent
be8ac83198 A first pass at letting users choose not to top-post their message
replies.  Code By achen.code@gmail.com

Fixes Issue 2262
2010-08-30 00:00:34 +00:00
Jesse Vincent
6e2c5be84c simplify a boolean in isMoveCapable 2010-08-29 23:40:14 +00:00
Jesse Vincent
1f399f5904 Simplify a boolean conditional 2010-08-29 23:40:00 +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
e0447e32cc astyle 2010-08-29 16:57:13 +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
cketti
38c31db8f6 Don't open a connection to the server if the protocol doesn't support flags and the flag to be changed isn't the deleted flag. This avoids unnecessary connections to POP3 servers.
Fixes issue 2046
2010-08-28 21:15:23 +00:00
Koji Arai
015666b657 Fixed issue 2174
When selecting one of the five vibrate patterns or the number of repetitions, we should demonstrate to the user what the vibrate pattern feels like. (Thanks to achen.code)

use the ListPreference instead of the EditTextPreference to set vibrate times.
2010-08-28 14:00:34 +00:00
cketti
41ebeb3498 Don't show K9mail-errors as move/copy destination folder.
Fixes issue 2219
2010-08-27 01:02:29 +00:00