Remove "showCorrespondentNames" methods from 'K9'

This commit is contained in:
cketti 2019-05-22 00:19:30 +02:00
parent ed0683d064
commit 13f2f7b581
4 changed files with 9 additions and 16 deletions

View file

@ -209,7 +209,9 @@ object K9 : KoinComponent {
@JvmStatic
var messageListPreviewLines = 2
private var showCorrespondentNames = true
@JvmStatic
var isShowCorrespondentNames = true
private var messageListSenderAboveSubject = false
private var showContactName = false
private var changeContactNameColor = false
@ -316,11 +318,6 @@ object K9 : KoinComponent {
updateLoggingStatus()
}
@JvmStatic
fun showCorrespondentNames(): Boolean {
return showCorrespondentNames
}
@JvmStatic
fun messageListSenderAboveSubject(): Boolean {
return messageListSenderAboveSubject
@ -330,10 +327,6 @@ object K9 : KoinComponent {
messageListSenderAboveSubject = sender
}
fun setShowCorrespondentNames(showCorrespondentNames: Boolean) {
K9.showCorrespondentNames = showCorrespondentNames
}
@JvmStatic
fun showContactName(): Boolean {
return showContactName
@ -560,7 +553,7 @@ object K9 : KoinComponent {
quietTimeStarts = storage.getString("quietTimeStarts", "21:00")
quietTimeEnds = storage.getString("quietTimeEnds", "7:00")
showCorrespondentNames = storage.getBoolean("showCorrespondentNames", true)
isShowCorrespondentNames = storage.getBoolean("showCorrespondentNames", true)
showContactName = storage.getBoolean("showContactName", false)
showContactPicture = storage.getBoolean("showContactPicture", true)
changeContactNameColor = storage.getBoolean("changeRegisteredNameColor", false)
@ -680,7 +673,7 @@ object K9 : KoinComponent {
editor.putBoolean("messageListStars", isShowMessageListStars)
editor.putInt("messageListPreviewLines", messageListPreviewLines)
editor.putBoolean("messageListCheckboxes", isShowMessageListCheckboxes)
editor.putBoolean("showCorrespondentNames", showCorrespondentNames)
editor.putBoolean("showCorrespondentNames", isShowCorrespondentNames)
editor.putBoolean("showContactName", showContactName)
editor.putBoolean("showContactPicture", showContactPicture)
editor.putBoolean("changeRegisteredNameColor", changeContactNameColor)

View file

@ -83,7 +83,7 @@ public class MessageHelper {
*/
public static CharSequence toFriendly(Address address, Contacts contacts) {
return toFriendly(address,contacts,
K9.showCorrespondentNames(),
K9.isShowCorrespondentNames(),
K9.changeContactNameColor(),
K9.getContactNameColor());
}

View file

@ -25,7 +25,7 @@ class GeneralSettingsDataStore(
"folderlist_wrap_folder_name" -> K9.wrapFolderNames()
"messagelist_stars" -> K9.isShowMessageListStars
"messagelist_checkboxes" -> K9.isShowMessageListCheckboxes
"messagelist_show_correspondent_names" -> K9.showCorrespondentNames()
"messagelist_show_correspondent_names" -> K9.isShowCorrespondentNames
"messagelist_sender_above_subject" -> K9.messageListSenderAboveSubject()
"messagelist_show_contact_name" -> K9.showContactName()
"messagelist_change_contact_name_color" -> K9.changeContactNameColor()
@ -59,7 +59,7 @@ class GeneralSettingsDataStore(
"folderlist_wrap_folder_name" -> K9.setWrapFolderNames(value)
"messagelist_stars" -> K9.isShowMessageListStars = value
"messagelist_checkboxes" -> K9.isShowMessageListCheckboxes = value
"messagelist_show_correspondent_names" -> K9.setShowCorrespondentNames(value)
"messagelist_show_correspondent_names" -> K9.isShowCorrespondentNames = value
"messagelist_sender_above_subject" -> K9.setMessageListSenderAboveSubject(value)
"messagelist_show_contact_name" -> K9.setShowContactName(value)
"messagelist_change_contact_name_color" -> K9.setChangeContactNameColor(value)

View file

@ -631,7 +631,7 @@ public class RecipientSelectView extends TokenCompleteTextView<Recipient> implem
}
public String getDisplayNameOrAddress() {
final String displayName = K9.showCorrespondentNames() ? getDisplayName() : null;
final String displayName = K9.isShowCorrespondentNames() ? getDisplayName() : null;
if (displayName != null) {
return displayName;