mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-09 18:43:23 +02:00
Added default compose font
This commit is contained in:
@@ -547,6 +547,8 @@ public class MessageHelper {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean autolist = prefs.getBoolean("autolist", true);
|
||||
boolean format_flowed = prefs.getBoolean("format_flowed", false);
|
||||
boolean monospaced = prefs.getBoolean("monospaced", false);
|
||||
String compose_font = prefs.getString("compose_font", monospaced ? "monospace" : "sans-serif");
|
||||
|
||||
// Build html body
|
||||
Document document = JsoupEx.parse(message.getFile(context));
|
||||
@@ -557,6 +559,12 @@ public class MessageHelper {
|
||||
HtmlHelper.convertLists(document);
|
||||
|
||||
if (send) {
|
||||
for (Element child : document.body().children())
|
||||
if (TextUtils.isEmpty(child.attr("fairemail"))) {
|
||||
String style = HtmlHelper.mergeStyles(
|
||||
"font-family:" + compose_font, child.attr("style"));
|
||||
child.attr("style", style);
|
||||
}
|
||||
document.select("div[fairemail=signature]").removeAttr("fairemail");
|
||||
document.select("div[fairemail=reference]").removeAttr("fairemail");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user