Remove "messageViewFixedWidthFont" methods from 'K9'

This commit is contained in:
cketti 2019-05-22 00:28:03 +02:00
parent bc76870004
commit 5855563124
3 changed files with 9 additions and 15 deletions

View file

@ -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)

View file

@ -93,7 +93,7 @@ public class HtmlConverter {
* {@code <head>} element when messages are displayed.
*/
static String cssStylePre() {
final String font = K9.messageViewFixedWidthFont()
final String font = K9.isUseMessageViewFixedWidthFont()
? "monospace"
: "sans-serif";
return "<style type=\"text/css\"> pre." + EmailTextToHtml.K9MAIL_CSS_CLASS +

View file

@ -33,7 +33,7 @@ class GeneralSettingsDataStore(
"messagelist_colorize_missing_contact_pictures" -> K9.isColorizeMissingContactPictures
"messagelist_background_as_unread_indicator" -> K9.useBackgroundAsUnreadIndicator()
"threaded_view" -> K9.isThreadedViewEnabled
"messageview_fixedwidth_font" -> K9.messageViewFixedWidthFont()
"messageview_fixedwidth_font" -> K9.isUseMessageViewFixedWidthFont
"messageview_autofit_width" -> K9.isAutoFitWidth
"start_integrated_inbox" -> K9.isStartInUnifiedInbox
"gestures" -> K9.isGesturesEnabled
@ -67,7 +67,7 @@ class GeneralSettingsDataStore(
"messagelist_colorize_missing_contact_pictures" -> K9.isColorizeMissingContactPictures = value
"messagelist_background_as_unread_indicator" -> K9.setUseBackgroundAsUnreadIndicator(value)
"threaded_view" -> K9.isThreadedViewEnabled = value
"messageview_fixedwidth_font" -> K9.setMessageViewFixedWidthFont(value)
"messageview_fixedwidth_font" -> K9.isUseMessageViewFixedWidthFont = value
"messageview_autofit_width" -> K9.isAutoFitWidth = value
"start_integrated_inbox" -> K9.isStartInUnifiedInbox = value
"gestures" -> K9.isGesturesEnabled = value