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.