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

3109 Commits

Author SHA1 Message Date
cketti
aab998d17f Avoid CursorIndexOutOfBoundsException when deleting a message
Deleting a message creates an entry in EmailProviderCache so
EmailProviderCacheCursor can skip the Cursor row during the time
it takes to update the database.
Previously EmailProviderCacheCursor.isLast() returned the wrong
result when the last row in the wrapped Cursor was hidden. This
lead to the crash in MergeCursor.

Fixes issue 5820
2013-08-23 04:16:00 +02:00
Jesse Vincent
7ba68dbc3c update the new message list item to work better in various odd configurations 2013-08-22 21:08:51 -04:00
Jesse Vincent
99e354bc9f Add back select/deselect action to return it to the context menu where users keep looking 2013-08-22 20:56:56 -04:00
Jesse Vincent
77d26af7aa Default checkboxes to off again 2013-08-22 20:56:56 -04:00
Jesse Vincent
cef82a5cc3 move thread count up to the subject line 2013-08-22 20:56:56 -04:00
Jesse Vincent
a8668f962d add back stars to the message list UI 2013-08-22 20:56:55 -04:00
Jesse Vincent
b2cfc40ab6 Fixes for showing the selected checkbox correctly 2013-08-22 20:56:55 -04:00
Jesse Vincent
0a79df2155 Revert "Remove the message list stars preference now that stars are in the chip"
This reverts commit 48785f52bf.

Conflicts:
	src/com/fsck/k9/K9.java
	src/com/fsck/k9/activity/Accounts.java
	src/com/fsck/k9/activity/FolderList.java
	src/com/fsck/k9/activity/MessageList.java
	src/com/fsck/k9/activity/setup/Prefs.java
2013-08-22 20:56:55 -04:00
Jesse Vincent
ee234b65f8 Return to old style chips for accounts, folders and messages.
My circle design stopped being even a little bit useful when we stopped showing
the "complex" versions of the shapes
2013-08-22 20:56:55 -04:00
cketti
9a385146c4 Replace tabs with spaces 2013-08-21 13:23:52 +02:00
cketti
bd3bd861c5 Optimize code to extract the character to display in the fallback contact picture 2013-08-21 13:08:05 +02:00
cketti
ce56475a4f Avoid race condition that can lead to a NullPointerException 2013-08-21 12:33:27 +02:00
cketti
f11f0fcc9b Skip incorrectly formatted/parsed LSUB/LIST replies
Example: * LIST (\HasChildren) "." [Folder]
"[Folder]" will be parsed as list containing the element "Folder".
2013-08-20 18:39:20 +02:00
cketti
4fe6f90428 Use Google's fix for the PRNG mess
Source: http://android-developers.blogspot.de/2013/08/some-securerandom-thoughts.html
2013-08-16 19:49:30 +02:00
cketti
20fcd6f63d Add setting to toggle colored background of fallback contact pictures 2013-08-16 18:43:00 +02:00
cketti
3064d8ab31 Code style and documentation cleanup 2013-08-16 01:49:26 +02:00
Joe Steele
b7c67019af SMTP dot stuffing should be done *after* line wrapping. 2013-08-13 19:27:40 -04:00
Joe Steele
564195bad9 Close stream when done (StrictMode error) 2013-08-09 19:17:07 -04:00
cketti
d8030eaa7c Make sure Account.getDescription() never returns null
Fixes issue 5857
2013-08-10 00:08:18 +02:00
Joe Steele
fcabb7395d bug fix: use "1" not "true" for SQL boolean
Ref:  Pull request #355 from @edemaine
2013-08-02 13:01:22 -04:00
Joe Steele
2df436e7bc Close stream when done (StrictMode error). 2013-08-02 12:56:10 -04:00
Joe Steele
fce39f0fce HTML tag cleanup
Effective with earlier commit e2c5229e85,
messages are wrapped with <html> tags at display time, rather than
when messages are saved.

For consistency, this commit removes tags from a status message, because
they, too, will be added back at display time.

Closes pull request 286.
2013-08-01 19:38:48 -04:00
Jesse Vincent
2ba84bceaa Merge pull request #353 from sfuhrm/gmail-style-user-pics
Gmail style user pics, 2nd try

* sfuhrm/gmail-style-user-pics:
  Changed the fallback char from 'K' to '?'. The riddler was here ;).
  Using Android proposed colors as contact color palette now: http://developer.android.com/design/style/color.html
  Fixed NPE found by blackbox87 ... thanks pal!
  Added more finer characters as proposed by cketti
  Caching also the calculated anonymous bitmap as proposed by maniac103. This removes a lot of code for special handling unknown contacts.
  Bugfix for negative modulo result indexing the palette array
  Changed hash based color calc to a hash indexed palette as discussed in the pull request.
  GMail-app-style generated colorful one-letter contact pictures for pictureless contacts

Conflicts:
	src/com/fsck/k9/activity/misc/ContactPictureLoader.java
	src/com/fsck/k9/fragment/MessageListFragment.java
2013-07-30 22:00:19 -04:00
Jesse Vincent
bbad298bf6 Convert OpenMode from an Enum to static ints for perf improvement.
(Based on profiling of long folder list opens)

This should be backported to 4.4
2013-07-30 21:32:35 -04:00
Jesse Vincent
e9a0cbb269 Ask SQLite for a simpler calculation when counting unread messages. The docs imply this is a decent perf win. I'm seeing at least a bit of one 2013-07-30 21:32:35 -04:00
Stephan Fuhrmann
c30af244cf Changed the fallback char from 'K' to '?'. The riddler was here ;). 2013-07-30 21:27:52 +02:00
Stephan Fuhrmann
ea5905861a Using Android proposed colors as contact color palette now: http://developer.android.com/design/style/color.html 2013-07-30 21:27:52 +02:00
Stephan Fuhrmann
393f45bda1 Fixed NPE found by blackbox87 ... thanks pal! 2013-07-30 21:27:52 +02:00
Stephan Fuhrmann
6af02c4c13 Added more finer characters as proposed by cketti 2013-07-30 21:27:52 +02:00
Stephan Fuhrmann
df5766ba3a Caching also the calculated anonymous bitmap as proposed by maniac103. This removes a lot of code for special handling unknown contacts. 2013-07-30 21:27:52 +02:00
Stephan Fuhrmann
d45c8b053b Bugfix for negative modulo result indexing the palette array 2013-07-30 21:27:52 +02:00
Stephan Fuhrmann
64212072c0 Changed hash based color calc to a hash indexed palette as discussed in the pull request. 2013-07-30 21:27:52 +02:00
cketti
e6d6744f55 Rename string to better convey the meaning
notification_action_read -> notification_action_mark_as_read
2013-07-23 20:12:48 +02:00
Jesse Vincent
917da8cd90 Fix for market-reported NPE:
java.lang.NullPointerException
at com.fsck.k9.controller.MessagingController.actOnMessages(MessagingController.java:5602)
at com.fsck.k9.controller.MessagingController.deleteThreads(MessagingController.java:3986)
at com.fsck.k9.fragment.MessageListFragment.onDelete(MessageListFragment.java:1311)
at com.fsck.k9.fragment.MessageListFragment.onDelete(MessageListFragment.java:1306)
at com.fsck.k9.fragment.MessageListFragment.onContextItemSelected(MessageListFragment.java:1506)
at android.support.v4.app.Fragment.performContextItemSelected(Fragment.java:1583)
at android.support.v4.app.FragmentManagerImpl.dispatchContextItemSelected(FragmentManager.java:1992)
at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:370)
at com.actionbarsherlock.app.SherlockFragmentActivity.onMenuItemSelected(SherlockFragmentActivity.java:211)
at com.android.internal.policy.impl.PhoneWindow$DialogMenuCallback.onMenuItemSelected(PhoneWindow.java:4038)
at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:735)
at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:149)
at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:874)
at com.android.internal.view.menu.MenuDialogHelper.onClick(MenuDialogHelper.java:193)
at com.android.internal.app.AlertController$AlertParams$3.onItemClick(AlertController.java:934)
at android.widget.AdapterView.performItemClick(AdapterView.java:301)
at android.widget.AbsListView.performItemClick(AbsListView.java:1287)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:3078)
at android.widget.AbsListView$1.run(AbsListView.java:4161)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4921)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
2013-07-21 15:54:46 -04:00
Stephan Fuhrmann
16f6d85ea2 GMail-app-style generated colorful one-letter contact pictures for pictureless contacts 2013-07-21 14:34:45 -04:00
Stephan Fuhrmann
3feaeb6903 GMail-app-style generated colorful one-letter contact pictures for pictureless contacts 2013-07-21 16:58:38 +02:00
Jesse Vincent
6c3fb46541 only show the super-condensed layout if the contact picture is not being displayed. 2013-07-21 09:20:40 -04:00
Jesse Vincent
86ec4b32e9 restore super-dense layout when the user has selected 0 lines of message preview 2013-07-20 14:53:39 -04:00
Jesse Vincent
1fa6d5f960 Add an index for a heavy query 2013-07-18 20:09:39 -04:00
Jesse Vincent
4bd6f36eb9 Don't invalidate the options menu from the message list as we open a
message. We also invalidate it (twice) as we show the message. It turns
out to have measurable performance impact on 2.3 thanks to ABS
2013-07-17 19:52:18 -04:00
Jesse Vincent
767352515f Cache our compat lookups for our message webview - (They're expensive on
older devices - and pointless not to reuse)
2013-07-17 18:33:19 -04:00
cketti
dda8395c7a Make sure we always have the ID of a folder when fetching the unread/flagged count 2013-07-16 16:54:26 +02:00
cketti
9a5fca2d16 Stop using the old Android Market URL 2013-07-16 16:24:51 +02:00
Jesse Vincent
876d478ad7 Opening a folder (especially in threaded mode) does a very heavy SQL query. This method doesn't use or modify the folder object. Don't cargo-cult the Open here.
(cketti may well tell me I'm wrong about this. Happy to listen & fix)
2013-07-11 18:44:44 -04:00
Jesse Vincent
bcc2263e07 Marking a message as read in the database is currently very expensive, especially if you have threading enabled.
Defer that until _after_ telling listeners that they're cool to show the message
2013-07-11 18:44:44 -04:00
Jesse Vincent
1bed455e4f Replace synchronous setting of a flag with async setting of the flag. This helps speed up message display time (anecdotally) 2013-07-11 18:44:44 -04:00
cketti
186f6d6ba2 Don't save signature to identity header if identity doesn't use a signature 2013-07-08 06:44:44 +02:00
cketti
306b258f25 Merge pull request #323 from jca02266/adapt_broken_server
Adapt broken pop3 server
2013-07-07 19:43:55 -07:00
cketti
5d07b6691b Don't load unread/flagged count when creating LocalFolder instances
This avoids a potentially expensive LEFT JOIN when querying the database.
2013-07-07 03:31:14 +02:00
cketti
422ba279b5 Refactor code to create LocalFolder instances from a database query. 2013-07-07 03:31:14 +02:00