1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-24 02:12:15 -05:00

Calculate preview for html-only messages

Fixes 2465
This commit is contained in:
Jesse Vincent 2010-10-16 08:27:47 +00:00
parent 6ea875d809
commit 496677dad4

View File

@ -8,6 +8,7 @@ import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException; import android.database.sqlite.SQLiteException;
import android.net.Uri; import android.net.Uri;
import android.text.Html;
import android.util.Log; import android.util.Log;
import com.fsck.k9.Account; import com.fsck.k9.Account;
import com.fsck.k9.K9; import com.fsck.k9.K9;
@ -1811,7 +1812,10 @@ public class LocalStore extends Store implements Serializable
String text = sbText.toString(); String text = sbText.toString();
String html = markupContent(text, sbHtml.toString()); String html = markupContent(text, sbHtml.toString());
String preview = calculateContentPreview(text); String preview = calculateContentPreview(text);
if (preview == null || preview.length() == 0)
{
preview = calculateContentPreview(Html.fromHtml(html).toString());
}
try try
{ {
ContentValues cv = new ContentValues(); ContentValues cv = new ContentValues();