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.
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.
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.
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.
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.
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().
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.
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.
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.
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.
- 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
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
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.
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.