Commit Graph

2733 Commits

Author SHA1 Message Date
cketti 46ed21d9f5 Merge branch 'smtp_port_fix' 2013-04-26 02:30:27 +02:00
cketti b91b86c657 Change SMTP default port to 587 2013-04-26 02:29:36 +02:00
cketti 1c722876f1 Use very light grey instead of white for message text in dark theme 2013-04-24 01:05:11 +02:00
cketti d14bdc0b79 Exclude folders Trash, Spam, and Outbox from "All messages" 2013-04-23 20:14:29 +02:00
cketti 8c8e0d299d Fix copyOrMove() so it works for single messages in Unified Inbox 2013-04-23 19:25:05 +02:00
cketti 8f9dd78012 Always enable "pull to refresh" when "check mail" action is shown 2013-04-23 18:55:24 +02:00
dzan 6c1b3cbc68 Change smtp+tls default port to 587. 2013-04-20 18:02:30 +02:00
cketti 5f49195a0a Hide "condensed layout" setting instead of disabling it 2013-04-19 02:24:41 +02:00
cketti e15409bafa Don't show ALL unread messages for "notification opens unread messages" 2013-04-18 22:06:33 +02:00
cketti 0d80dd8fe1 Avoid another NPE 2013-04-18 05:49:18 +02:00
cketti 51ad31a513 Avoid NullPointerException 2013-04-18 05:43:11 +02:00
cketti 4890cd9ea0 Better cope with messages having identical message IDs 2013-04-17 02:09:43 +02:00
cketti d29825fe57 Fix settings file versioning 2013-04-16 01:21:26 +02:00
dzan 33cf1bc222 If messagelist started from Unified localsearch, verify if we are really dealing with multiple accounts. If not then set SingleAccountMode anyway. 2013-04-14 14:47:45 +02:00
Joe Steele 84769d2433 Fix indentation 2013-04-11 22:26:32 -04:00
Joe Steele aedbe46975 Correct preference version number.
New number should match updated Settings.VERSION
2013-04-05 11:02:20 -04:00
Joe Steele d9979cb1a2 Issue 4503: Auto-fit messages option
Create a preference option to automatically shrink messages
to fit the screen width (default setting is "shrink").
2013-04-04 17:11:17 -04:00
Joe Steele 0ecc49815f Don't show a disabled preference if there is nothing a user can do to enable it. 2013-04-04 16:48:54 -04:00
Jesse Vincent f363333c87 simplify the messagelist chips based on lots of user screaming. default checkboxes to being on. 2013-04-02 23:49:06 -04:00
cketti 175e29b71d Make status display less awkward when checking mail from Unified Inbox
We really need to fix the ActivityListener madness :(
2013-04-03 03:08:06 +02:00
cketti b096c2bf19 Fix unread count in notifications (again) 2013-04-02 21:47:37 +02:00
cketti c5dc626bbc Show "check mail" action when displaying Unified Inbox etc. 2013-04-02 21:47:20 +02:00
cketti 0c5bdf2c97 Add "Mark all as read" action to message list 2013-04-02 19:17:58 +02:00
cketti 002e3dd538 Avoid IllegalStateException
Reported for Kaiten:
java.lang.IllegalStateException: Can not perform this action after
onSaveInstanceState
...
at android.support.v4.app.DialogFragment.dismiss
2013-04-02 04:02:54 +02:00
cketti 9d7eae252e Avoid NullPointerException 2013-04-02 04:02:25 +02:00
cketti 0ba4bf6973 Fix NPE when fragment detached from activity 2013-04-02 04:02:24 +02:00
cketti bc665bffe1 Fix NPE introduced in 340d6e0522 2013-03-31 16:53:27 +02:00
cketti 48c3fbd2ba Don't crash when being started by an old unread widget intent 2013-03-31 01:35:38 +01:00
cketti 33a2b05701 Get rid of accidentally created "-NONE-" folder 2013-03-31 01:13:09 +01:00
cketti f95e64f766 Don't create folder -NONE- when excluding special folders from a search 2013-03-31 01:02:31 +01:00
cketti ce0308f528 Avoid NullPointerException in SubjectComparator 2013-03-31 00:48:01 +01:00
cketti c4799d20f0 Fix condition on when to show "check mail" in POP3 accounts 2013-03-31 00:24:28 +01:00
cketti 340d6e0522 Use themed context when creating EmailAddressAdapter
Previously the activity theme was used to display the auto-complete
suggestions. This lead to unreadable text when the activity theme was
different from the "composer theme".
2013-03-28 19:36:41 +01:00
m0viefreak d85af1bfe0 reenable sorting by sender in messagelist
This was disabled in faa666394c
because it isn't possible to extract the name of the android
contact in the 'ORDER BY...' clause when querying the database.
Instead it simply sorts by the email address.

This may cause the same contact to appear multiple times in
the list, if they have multiple email addresses assigned.

But in most cases this is good enough and surely better than
not having the option to sort by sender at all.

Desktop mail clients such as Thunderbird also simply use the
sender email information when sorting the column.

This also adds a SenderComparator for usage in the MergeCursor.
2013-03-27 13:08:42 +01:00
cketti 2fc3909ec3 Fix NullPointerException 2013-03-22 19:51:58 +01:00
cketti 597e954798 Avoid NullPointerException (reported via Play Store) 2013-03-21 23:19:11 +01:00
cketti 9ea46cf03b Merge branch 'Issue_4019_pinch_zoom'
Conflicts:
	src/com/fsck/k9/view/MessageWebView.java
2013-03-19 21:09:23 +01:00
cketti 55ca846ced Avoid NullPointerException when message contains no subject 2013-03-19 03:08:18 +01:00
cketti 9118097dcb Avoid NullPointerException when decoding contact pictures 2013-03-19 02:59:05 +01:00
cketti 1c75590e7a Fix crash due to ambiguous column name in SORT clause 2013-03-19 02:32:47 +01:00
cketti aff9bec92b Work around a bug in ListView 2013-03-18 22:56:56 +01:00
cketti 94b5758eea Use cache when marking message as read on view 2013-03-18 17:53:18 +01:00
cketti a364d6262d Fix cache cleanup 2013-03-18 17:44:33 +01:00
Danny Baumann 538b81b6ec Make notification task back stack consistent to activity flow.
Fixes #4956.
2013-03-15 13:25:25 +01:00
Danny Baumann 195686cbd6 Fix NPE when clicking on a notification with >= 2 messages on SDK < 16.
Seemingly the intents in the task back stack got confused when the
pending intent was updated in those versions (the Accounts intent was
delivered to MessageList). Avoid that by not updating the current
intent, but dropping the old one.

Fixes issue #4955.
2013-03-15 12:48:04 +01:00
cketti b4c599d514 Merge pull request #281 from k9mail/fix_webview_autoscroll
Hack around WebView's initial auto-scrolling past the message header
2013-03-13 19:22:05 -07:00
cketti a3802a7a8e Only Jelly Bean seems to have the auto-scroll issue 2013-03-14 03:19:42 +01:00
Danny Baumann 3ff522c9c4 Include a full activity back stack when building notification intents. 2013-03-13 11:03:51 +01:00
Danny Baumann d523caa61b Also clear back stack when a new intent arrives.
This should make sure there aren't any old fragment instances in that
case.
2013-03-13 11:03:51 +01:00
cketti a619a9df93 Hide delete policy "Mark as read on server" for POP3 accounts 2013-03-13 06:34:14 +01:00
cketti 8dcc769c50 Hack around WebView's initial auto-scrolling past the message header 2013-03-12 07:54:38 +01:00
cketti 625c5f1874 Fix "Empty trash" functionality for POP3 accounts
Previously messages in the local Trash folder were marked as deleted,
then deleted from the server. During the next sync the placeholders for
deleted messages are removed from the database.
Obviously this doesn't work for POP3 accounts because the Trash folder
can't be synchronized with the server. So, for POP3, we now immediately
clear out all messages in that folder.
2013-03-10 21:45:36 +01:00
cketti 0319ee4a5d Move KOI8-U -> KOI8-R fixup to charset fall-back table 2013-03-10 09:55:25 +01:00
cketti 4b42d0e062 Code cleanup 2013-03-10 09:39:03 +01:00
eagan c5802ed8ef Java5 style 'for' 2013-03-10 09:25:28 +01:00
eagan a5f4ddae91 Enhancement for charset fallback.
Fallback rule is defined in CHARSET_FALLBACK_MAP.
Multi-level fallback is supported.
2013-03-10 09:25:13 +01:00
cketti 337487e2ae Merge pull request #211 from colund/master
Close stream in case of an exception
2013-03-10 00:11:53 -08:00
cketti aea95b1493 Disable server side full text search for the moment
The server search itself does work. But the results are not displayed
to the user because only the message headers of found messages are
downloaded and the subsequent search in the local database won't return
those messages.
2013-03-10 03:00:16 +01:00
cketti 658b5dbff6 Fix and vastly simplify the query for the threaded message list
This requires another database schema change. With this change messages
at the root of a thread reference themselves in the 'threads' table,
i.e. 'root' contains the value of 'id' for these messages. It makes
selecting all messages in a thread much simpler.
2013-03-08 01:15:26 +01:00
cketti 6b3a3f7ee0 Fix message list item background color 2013-03-07 00:11:05 +01:00
Danny Baumann ae28b1aa38 Center folders without status (e.g. outbox) in folder list again. 2013-03-06 10:30:23 +01:00
cketti f990e6f032 Fix indentation and code style 2013-03-06 07:53:39 +01:00
Uni- 323159ef97 Fix error duplicating false accounts when adding an account 2013-03-06 07:52:32 +01:00
cketti 4202ffe57d Merge branch 'improve_import' 2013-03-06 07:49:53 +01:00
cketti 7ff0da0b52 Refactor code to start Accounts activity to import settings 2013-03-06 06:26:04 +01:00
cketti dc8cb3ba17 Fix indentation/code style 2013-03-06 06:16:07 +01:00
Uni- 4f5ab86be3 Add settings import on Welcome 2013-03-05 16:31:45 +09:00
Uni- 91a32e9c92 Fix NPE on isAccountNameUsed 2013-03-05 16:29:03 +09:00
cketti 754c0f2b93 Don't load resources when activity is not attached 2013-03-05 04:18:54 +01:00
cketti c07f94e877 Fix NPE when moving a message from Unified Inbox (multiple accounts) 2013-03-05 04:09:47 +01:00
cketti fe02f0c44a Avoid NPE reported via Play Store 2013-03-05 03:54:27 +01:00
cketti df8ea306b8 Avoid NPE 2013-03-05 03:35:09 +01:00
cketti e77c341542 Avoid NPE reported via Play Store 2013-03-05 03:31:18 +01:00
cketti 5270ebd629 Avoid NPE 2013-03-05 03:26:09 +01:00
cketti 41244ef448 Don't finish() MessageList when forwarding or replying to a message 2013-03-04 21:19:08 +01:00
cketti 78dc5e5194 Use different background for selected messages in message list 2013-03-03 22:52:03 +01:00
Joe Steele c790fa73c1 Don't store the font-family preference with plain text messages.
Dynamically generate the CSS style for <pre> elements
for inclusion in the HTML <head> element when messages
are displayed.

This permits a user to change their font-family preference
for plain text messages and see the results immediately.

Obviously any old locally-stored messages that had their
font-family stored with them will continue to display using
that font-family, irrespective of the user's current
preference setting.
2013-03-01 18:48:46 -05:00
cketti 04e1bf6976 Restore code to remember the last direction messages were displayed in 2013-03-01 22:38:09 +01:00
Joe Steele 548b8e07a6 Refactor code for MessageWebView.setText()
The MIME type for the supplied text was always text/html,
so there is no need to pass that as a parameter.
Furthermore, we are relying on it being text/html because
we are wrapping it with HTML code.

Likewise, change/simplify/rename AccessibleWebView.loadDataWithBaseURL().
2013-03-01 14:32:16 -05:00
Joe Steele 6a844a2553 Remove unused code in HtmlConverter.
HtmlConverter.getHtmlHeader() and getHtmlFooter() are
no longer used.  Remove them and other related code.
2013-03-01 14:30:42 -05:00
Joe Steele e2c5229e85 Change when <html> tags are applied to messages.
Previously, <html>, <head>, & <body> tags were
attached to messages before they were stored locally.
But now that the <head> element also needs to include
a <meta> element (for proper MessageWebView display),
it seems unecesary to store all these tags with each
message.

Now the tags are no longer stored with the messages.  Instead,
MessageWebView applies the tags before displaying the message.

This also eliminates the need to upgrade an older
message database where all the old messages would have
otherwise needed to be wrapped with the new tags.
2013-03-01 12:59:59 -05:00
Joe Steele 731022339d Improve MessageWebView display.
Now that MessageWebView has 'setUseWideViewPort(true)',
the wide view port is excessively wide.  It turns out
Android is using a fixed width of 980 px, so that even
plain text messages (which are already wrapped to fit
the screen) have a large empty area beside them when
scrolled to the left.

Injecting a meta tag in the html header fixes the
problem.
2013-03-01 12:55:51 -05:00
Joe Steele 28212bc04f Issue 4019 -- Fix inability to zoom out.
Thanks to davidgca...@gmail.com for references in
his comments 80 & 81.
2013-02-27 16:11:08 -05:00
cketti 207e2a1e56 Notification icon update
Android 2.2: use old icon
Android 2.3: new icon, (try to) follow icon guidelines for 2.3
Android 3.0+: new icon, follow guidelines for 3.0+

See http://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar.html
2013-02-26 20:34:52 +01:00
cketti 556503318c Rework code for predefinied account colors 2013-02-26 18:29:12 +01:00
dzan f7bef247f5 Fix setChipColor call. 2013-02-26 09:42:49 +01:00
dzan 6735592204 Add a series of predefined account colors and pick those if any remain before generating complete random one. 2013-02-25 14:34:53 +01:00
cketti eed64a37f8 Remove unused batch button settings 2013-02-22 23:40:42 +01:00
cketti 906163b538 Use correct string for notification title 2013-02-21 05:42:04 +01:00
cketti d6d9effbec Remove unused stuff 2013-02-21 02:00:12 +01:00
cketti 92c21ece6d Fix showing unread count in pre-Honeycomb notifications
Fixes issue 4904
2013-02-20 23:55:46 +01:00
cketti fdfaf03b7a Fix dialog message when deleting multiple messages from a notification 2013-02-19 05:38:48 +01:00
cketti 3379fdb573 Merge pull request #266 from m0vie/npe-fix
message view / list: fix NPE when list is empty
2013-02-18 20:33:25 -08:00
cketti 1a034d3e59 Merge pull request #265 from jca02266/master
If there is no message, it should return to a MessageList.
2013-02-18 20:32:16 -08:00
cketti 50fcff76fd Add a caching layer to EmailProvider
Database updates can be surprisingly slow. This lead to slow updates of
the user interface which in turn made working with K-9 Mail not as fun
as it should be. This commit hopefully changes that.
2013-02-19 04:45:14 +01:00
m0viefreak dd5d8561cd message view / list: fix NPE when list is empty
This happened for example in a starred-message-only view when
un-starting the last message. This led to isFirst() and isLast()
causing a NullPointerException when trying to update the
previous / next buttons.
2013-02-18 19:02:22 +01:00
Koji Arai 7da4c7cc1b Avoid IndexOutOfRangeException.
If there is no next message, it should return to a MessageList.
2013-02-19 02:06:36 +09:00
cketti 44da998f0c Fix NullPointerException 2013-02-18 05:05:01 +01:00
cketti 25c452420d Resize contact images to display size
Display size was changed in 20d229c91b
2013-02-13 19:43:07 +01:00
Danny Baumann 370ef4c181 Fix NPE.
As the background is gone now, we shouldn't touch it anymore.
2013-02-13 14:50:48 +01:00
Danny Baumann 49d1bdbcb0 Improve last folder update time formatting. 2013-02-13 11:20:40 +01:00
Danny Baumann 099da1913b Improve some layouts. 2013-02-13 11:20:33 +01:00
Jesse Vincent d92a30f807 Experimental change to move most of our refile buttons into a refile submenu. Specifically to elicit feedback. I don't expect this change to stick around in its current form. But I do want to get a sense of whether it's something that makes people happy or angry 2013-02-11 15:28:53 -05:00
Danny Baumann 7afbda9e20 Regularly trigger a title and folder update while activity is resumed.
This makes sure the relative times are kept up-to-date.
2013-02-11 15:44:25 +01:00
Danny Baumann 0fac8e999d Clean up date handling.
Remove home-grown date formatting, and replace it by usage of the
DateUtils class which is present since API level 3.
2013-02-11 15:19:15 +01:00
m0viefreak 8d4a82ba0e message view: fix subject bugs
- Android does not support ellipsize in combination with maxlines
  for TextViews. This caused getEllipsisCount() in MessageTitleView
  to always fail, and the full subject was never shown in the regular
  headers area when needed.
  To work around that, check for ourselves whether the text is
  longer than 2, and ellipsize manually.

- Clicking the star button on a message caused the subject line to
  re-appear, even if it fits in the action bar title without being
  cut off. This was caused by MessageHeader.populate(), which always
  set the subject to visible.
  As a workaround: Only set subject to visible in case populate()
  actually shows a new message.

- delete res/layout/actionbar_message_view.xml, its already present
  in the actionbar_custom.xml
2013-02-11 13:47:31 +01:00
m0viefreak 865151fef8 merge date and time font size preference into one
The header changes merged those, so remove the now unneeded preferece, too.
2013-02-11 13:05:52 +01:00
Danny Baumann ee65217ac3 Properly clear out old state when receiving a new intent.
This fixes the following scenario:
- Get a mail notification
- Click on notification -> message view appears
- Press home
- Get a new notification
- Click on notification -> last instead of new message is displayed
2013-02-11 09:19:42 +01:00
Danny Baumann 3807d2881d Fix warnings. 2013-02-11 09:19:29 +01:00
cketti 73ab6ba719 Add animated notification icon for "check mail" 2013-02-11 01:31:56 +01:00
Jesse Vincent ed90f3be44 MessageView quick contact badges 2013-02-10 19:02:17 -05:00
Jesse Vincent fd19704fe5 show the date and time in a single view on a single line 2013-02-10 19:02:17 -05:00
Jesse Vincent 648a6eed86 move the To and Cc labels into their own Views; stop playing span games to style them 2013-02-10 19:02:17 -05:00
Jesse Vincent 82a8ac6278 There's no good reason to exclude the Subject from the "full headers" view, especicially since we now play games with it sometimes showing up in the header and sometimes in the titlebar 2013-02-10 19:02:17 -05:00
Jesse Vincent c4b941b9b9 Switch our font sizes to have a "default", which is the size described in the XML.
Unify the text field size setting code. We should put it in a better place
2013-02-10 19:02:17 -05:00
cketti 3a7f1249dc Fix some display issues 2013-02-08 18:04:39 +01:00
cketti b25dfb802d Resize the contact picture bitmaps to the display size 2013-02-08 18:04:38 +01:00
cketti d86dd3a4e7 Add setting for contact pictures to import/export code 2013-02-08 15:41:14 +01:00
cketti c27a5a8104 Add setting to toggle contact pictures 2013-02-08 15:37:28 +01:00
cketti 04ce0a9d3f Add contact pictures to message list 2013-02-08 15:37:27 +01:00
cketti ae5e1af54d Fix settings import/export 2013-02-08 15:24:04 +01:00
m0viefreak c59d70b8c6 Compose: Don't just theme the editboxes, but the whole content (but not the actionbar)
This way also the From: selection, To:, Cc, and Bcc: are themed correctly.
It looks more homogeneous and is consistent with the looks of the MessageView.
2013-02-08 15:24:04 +01:00
Danny Baumann 8f3e61feab Convert theme setting value to an enum. 2013-02-08 15:24:03 +01:00
Danny Baumann bd154c4c0f Allow changing the message composer theme (background and text color). 2013-02-08 15:24:02 +01:00
Danny Baumann 728c1bdabe Remove text selection menu item for JB and higher.
Those versions have text selection support built-in (via long pressing
the WebView).
2013-02-08 15:24:02 +01:00
Danny Baumann 2ea0961006 Move message view theme setting from message view menu to global prefs
by default.

The message view theme isn't something the user is likely to change on a
regular basis, so we don't need to clutter the message view menu with
this setting. The menu item can still be enabled for those who want it.
2013-02-08 15:24:01 +01:00
Jesse Vincent 7714bc3cfa Move "show all headers" into the menu (and out of the UI) 2013-02-07 15:27:22 -05:00
cketti 610af1dfe5 Don't blindly use the saved display mode value 2013-02-06 21:21:13 +01:00
cketti 1244cc864a Make sure onSwitchComplete() is also called when animations are disabled 2013-02-06 21:21:13 +01:00
cketti 0cd7eb12ed Don't call MessageListFragment methods until initialization is complete 2013-02-06 18:11:29 +01:00
cketti 74bbbe7ea5 Fix not marking messages as read on viewing 2013-02-06 17:38:10 +01:00
cketti 07490613b6 Merge pull request #242 from maniac103/fix-sort
Fix sorting of threaded messages.
2013-02-06 08:22:22 -08:00
Danny Baumann 03f9b9ef0d Respect the 'enable animations' pref when animating views. 2013-02-06 10:54:13 +01:00
Danny Baumann 1d849f6664 Fix message view menu items being present after displaying a message and
going back.
2013-02-06 10:43:43 +01:00
Danny Baumann 62ee3bb0d6 Remove useless assignment.
mSavedListState is guaranteed to be null at this point.
2013-02-06 10:43:35 +01:00
cketti 3286cea148 Only remove message view fragment after animation is complete 2013-02-06 00:56:33 +01:00
cketti 473aebefdb Don't show animation when directly opening message view 2013-02-06 00:41:33 +01:00
cketti e59d23ca0e Fix NullPointerException 2013-02-06 00:39:45 +01:00
cketti ac9259a0e3 Restructure MessageHeader to avoid NPE when used by MessageTitleView 2013-02-05 23:55:21 +01:00
cketti 08198d8767 Remove old subject from action bar when loading new message 2013-02-05 23:49:53 +01:00
m0viefreak 1dd697f091 MessageView: fix crash when clicking on URLs in WebView
The ContextThemeWrapper added in a74d57cb71
used getActivity().getApplicationContext() to get the base context.
This is wrong, because an Application context won't work for starting
activities from the WebView.

Instead, use the context that is given to us in the constructor as base
context. This is the one that would also  be used if no ContextThemeWrapper
was present at all.
2013-02-05 23:13:08 +01:00
m0viefreak 5fa7e65816 MessageView: another theme fix
- The attachments view still had the wrong background color in case
  of different global and message themes.

- The attachments view used the activity LayoutInflater, but it needs
  to use the one of the fragment.

- The background drawable for the attachments used transparency, and
  thus was completely invisible in the black theme. Fix it by adding
  another one for the black theme.
2013-02-05 23:12:52 +01:00
cketti f5ec5cd3fb Avoid saved state being discarded when message list is modified 2013-02-05 20:00:31 +01:00
cketti cb51da5ea8 Fix restoring instance state of fragment on back stack 2013-02-05 20:00:31 +01:00
cketti 4b920e19b0 Simplify Handler code to restore message list state 2013-02-05 20:00:30 +01:00
cketti 7f39b3c6d8 Fix a potential NullPointerException when rotating the device twice
When MessageListFragment is on the back stack and the device is rotated
the instance state will be restored but no new view will be created. If
the device is rotated again onSaveInstanceState() is called and we have
to take care not to assume that the views have been created.
2013-02-05 20:00:30 +01:00
Jesse Vincent 0b04e526b4 Because we're not reusing the message view, we don't need to force scrolling. This has the side effect of cutting down on a momentary flash of message header area on display. 2013-02-05 12:26:16 -05:00
Jesse Vincent 69da9bdd7a Only animate the firt view transition if it's from the message list to the message view 2013-02-05 12:18:56 -05:00
Jesse Vincent 3b8421a9a8 Tweak animations to use the (Slightly slower) android default animation speed.
Remove the fadeout to make things look a little less weird
Make the animations slide in from the edge. (See the aforementioned comment about jankyness)

TODO: don't remove the message view until _after_ the animation runs. Before HC, that requires rather a lot more code (writing a whole animationadapter) than it should.

TODO: get the messageview to stop jumping to hide the header area as it's displayed.
2013-02-05 12:04:03 -05:00
Danny Baumann 499e20ef76 Make next/prev buttons track their state again. 2013-02-05 16:11:56 +01:00