Inline full message display

This commit is contained in:
M66B
2019-10-04 15:25:04 +02:00
parent f590613292
commit c4c0d2a80b
14 changed files with 537 additions and 526 deletions

View File

@@ -2026,7 +2026,6 @@ public class FragmentCompose extends FragmentBase {
long answer = args.getLong("answer", -1);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean text_color = prefs.getBoolean("text_color", true);
boolean plain_only = prefs.getBoolean("plain_only", false);
boolean encrypt_default = prefs.getBoolean("encrypt_default", false);
boolean receipt_default = prefs.getBoolean("receipt_default", false);
@@ -2096,7 +2095,7 @@ public class FragmentCompose extends FragmentBase {
data.draft.subject = args.getString("subject", "");
body = args.getString("body", "");
if (!TextUtils.isEmpty(body))
body = HtmlHelper.sanitize(context, body, text_color, false);
body = HtmlHelper.sanitize(context, body, false);
if (answer > 0) {
EntityAnswer a = db.answer().getAnswer(answer);
@@ -2164,7 +2163,7 @@ public class FragmentCompose extends FragmentBase {
data.draft.subject = ref.subject;
if (ref.content) {
String html = Helper.readText(ref.getFile(context));
body = HtmlHelper.sanitize(context, html, text_color, true);
body = HtmlHelper.sanitize(context, html, true);
}
} else if ("list".equals(action)) {
data.draft.subject = ref.subject;
@@ -2411,7 +2410,7 @@ public class FragmentCompose extends FragmentBase {
if (data.draft.content) {
File file = data.draft.getFile(context);
String html = Helper.readText(file);
html = HtmlHelper.sanitize(context, html, true, true);
html = HtmlHelper.sanitize(context, html, true);
Helper.writeText(file, html);
} else {
if (data.draft.uid == null)
@@ -3114,9 +3113,6 @@ public class FragmentCompose extends FragmentBase {
final long id = args.getLong("id");
final boolean show_images = args.getBoolean("show_images", false);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean text_color = prefs.getBoolean("text_color", true);
int colorPrimary = Helper.resolveColor(context, R.attr.colorPrimary);
DB db = DB.getInstance(context);
@@ -3143,7 +3139,7 @@ public class FragmentCompose extends FragmentBase {
Spanned spannedRef = null;
File refFile = draft.getRefFile(context);
if (refFile.exists()) {
String quote = HtmlHelper.sanitize(context, Helper.readText(refFile), text_color, show_images);
String quote = HtmlHelper.sanitize(context, Helper.readText(refFile), show_images);
Spanned spannedQuote = HtmlHelper.fromHtml(quote,
new Html.ImageGetter() {
@Override