Remove "messageListSenderAboveSubject" methods from 'K9'

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

View file

@ -212,7 +212,9 @@ object K9 : KoinComponent {
@JvmStatic
var isShowCorrespondentNames = true
private var messageListSenderAboveSubject = false
@JvmStatic
var isMessageListSenderAboveSubject = false
private var showContactName = false
private var changeContactNameColor = false
@ -318,15 +320,6 @@ object K9 : KoinComponent {
updateLoggingStatus()
}
@JvmStatic
fun messageListSenderAboveSubject(): Boolean {
return messageListSenderAboveSubject
}
fun setMessageListSenderAboveSubject(sender: Boolean) {
messageListSenderAboveSubject = sender
}
@JvmStatic
fun showContactName(): Boolean {
return showContactName
@ -541,7 +534,7 @@ object K9 : KoinComponent {
measureAccounts = storage.getBoolean("measureAccounts", true)
countSearchMessages = storage.getBoolean("countSearchMessages", true)
isHideSpecialAccounts = storage.getBoolean("hideSpecialAccounts", false)
messageListSenderAboveSubject = storage.getBoolean("messageListSenderAboveSubject", false)
isMessageListSenderAboveSubject = storage.getBoolean("messageListSenderAboveSubject", false)
isShowMessageListCheckboxes = storage.getBoolean("messageListCheckboxes", false)
isShowMessageListStars = storage.getBoolean("messageListStars", true)
messageListPreviewLines = storage.getInt("messageListPreviewLines", 2)
@ -668,7 +661,7 @@ object K9 : KoinComponent {
editor.putBoolean("startIntegratedInbox", isStartInUnifiedInbox)
editor.putBoolean("measureAccounts", measureAccounts)
editor.putBoolean("countSearchMessages", countSearchMessages)
editor.putBoolean("messageListSenderAboveSubject", messageListSenderAboveSubject)
editor.putBoolean("messageListSenderAboveSubject", isMessageListSenderAboveSubject)
editor.putBoolean("hideSpecialAccounts", isHideSpecialAccounts)
editor.putBoolean("messageListStars", isShowMessageListStars)
editor.putInt("messageListPreviewLines", messageListPreviewLines)

View file

@ -51,7 +51,7 @@ public class MessageListRemoteViewFactory implements RemoteViewsService.RemoteVi
@Override
public void onCreate() {
senderAboveSubject = K9.messageListSenderAboveSubject();
senderAboveSubject = K9.isMessageListSenderAboveSubject();
readTextColor = ContextCompat.getColor(context, R.color.message_list_widget_text_read);
unreadTextColor = ContextCompat.getColor(context, R.color.message_list_widget_text_unread);
}

View file

@ -652,7 +652,7 @@ public class MessageListFragment extends Fragment implements OnItemClickListener
public void onResume() {
super.onResume();
senderAboveSubject = K9.messageListSenderAboveSubject();
senderAboveSubject = K9.isMessageListSenderAboveSubject();
if (!loaderJustInitialized) {
restartLoader();

View file

@ -26,7 +26,7 @@ class GeneralSettingsDataStore(
"messagelist_stars" -> K9.isShowMessageListStars
"messagelist_checkboxes" -> K9.isShowMessageListCheckboxes
"messagelist_show_correspondent_names" -> K9.isShowCorrespondentNames
"messagelist_sender_above_subject" -> K9.messageListSenderAboveSubject()
"messagelist_sender_above_subject" -> K9.isMessageListSenderAboveSubject
"messagelist_show_contact_name" -> K9.showContactName()
"messagelist_change_contact_name_color" -> K9.changeContactNameColor()
"messagelist_show_contact_picture" -> K9.showContactPicture()
@ -60,7 +60,7 @@ class GeneralSettingsDataStore(
"messagelist_stars" -> K9.isShowMessageListStars = value
"messagelist_checkboxes" -> K9.isShowMessageListCheckboxes = value
"messagelist_show_correspondent_names" -> K9.isShowCorrespondentNames = value
"messagelist_sender_above_subject" -> K9.setMessageListSenderAboveSubject(value)
"messagelist_sender_above_subject" -> K9.isMessageListSenderAboveSubject = value
"messagelist_show_contact_name" -> K9.setShowContactName(value)
"messagelist_change_contact_name_color" -> K9.setChangeContactNameColor(value)
"messagelist_show_contact_picture" -> K9.setShowContactPicture(value)