diff --git a/app/core/src/main/java/com/fsck/k9/K9.kt b/app/core/src/main/java/com/fsck/k9/K9.kt index b90605316..481af9f74 100644 --- a/app/core/src/main/java/com/fsck/k9/K9.kt +++ b/app/core/src/main/java/com/fsck/k9/K9.kt @@ -225,7 +225,10 @@ object K9 : KoinComponent { var contactNameColor = 0xff00008f.toInt() private var showContactPicture = true - private var messageViewFixedWidthFont = false + + @JvmStatic + var isUseMessageViewFixedWidthFont = false + private var messageViewReturnToList = false private var messageViewShowNext = false var isGesturesEnabled = true @@ -323,15 +326,6 @@ object K9 : KoinComponent { updateLoggingStatus() } - @JvmStatic - fun messageViewFixedWidthFont(): Boolean { - return messageViewFixedWidthFont - } - - fun setMessageViewFixedWidthFont(fixed: Boolean) { - messageViewFixedWidthFont = fixed - } - @JvmStatic fun messageViewReturnToList(): Boolean { return messageViewReturnToList @@ -536,7 +530,7 @@ object K9 : KoinComponent { showContactPicture = storage.getBoolean("showContactPicture", true) isChangeContactNameColor = storage.getBoolean("changeRegisteredNameColor", false) contactNameColor = storage.getInt("registeredNameColor", -0xffff71) - messageViewFixedWidthFont = storage.getBoolean("messageViewFixedWidthFont", false) + isUseMessageViewFixedWidthFont = storage.getBoolean("messageViewFixedWidthFont", false) messageViewReturnToList = storage.getBoolean("messageViewReturnToList", false) messageViewShowNext = storage.getBoolean("messageViewShowNext", false) wrapFolderNames = storage.getBoolean("wrapFolderNames", false) @@ -656,7 +650,7 @@ object K9 : KoinComponent { editor.putBoolean("showContactPicture", showContactPicture) editor.putBoolean("changeRegisteredNameColor", isChangeContactNameColor) editor.putInt("registeredNameColor", contactNameColor) - editor.putBoolean("messageViewFixedWidthFont", messageViewFixedWidthFont) + editor.putBoolean("messageViewFixedWidthFont", isUseMessageViewFixedWidthFont) editor.putBoolean("messageViewReturnToList", messageViewReturnToList) editor.putBoolean("messageViewShowNext", messageViewShowNext) editor.putBoolean("wrapFolderNames", wrapFolderNames) diff --git a/app/core/src/main/java/com/fsck/k9/message/html/HtmlConverter.java b/app/core/src/main/java/com/fsck/k9/message/html/HtmlConverter.java index e5fd3d9f0..9ee6165c3 100644 --- a/app/core/src/main/java/com/fsck/k9/message/html/HtmlConverter.java +++ b/app/core/src/main/java/com/fsck/k9/message/html/HtmlConverter.java @@ -93,7 +93,7 @@ public class HtmlConverter { * {@code } element when messages are displayed. */ static String cssStylePre() { - final String font = K9.messageViewFixedWidthFont() + final String font = K9.isUseMessageViewFixedWidthFont() ? "monospace" : "sans-serif"; return "