Rename K9.isHideSpecialAccounts to K9.isShowUnifiedInbox

This commit is contained in:
cketti 2021-02-07 13:15:53 +01:00
parent bcb9c2f839
commit a3e0b89f01
6 changed files with 13 additions and 13 deletions

View file

@ -227,7 +227,7 @@ object K9 : EarlyInit {
var isUseVolumeKeysForListNavigation = false
@JvmStatic
var isHideSpecialAccounts = false
var isShowUnifiedInbox = true
@JvmStatic
var isAutoFitWidth: Boolean = false
@ -338,7 +338,7 @@ object K9 : EarlyInit {
isShowAnimations = storage.getBoolean("animations", true)
isUseVolumeKeysForNavigation = storage.getBoolean("useVolumeKeysForNavigation", false)
isUseVolumeKeysForListNavigation = storage.getBoolean("useVolumeKeysForListNavigation", false)
isHideSpecialAccounts = storage.getBoolean("hideSpecialAccounts", false)
isShowUnifiedInbox = !storage.getBoolean("hideSpecialAccounts", false)
isMessageListSenderAboveSubject = storage.getBoolean("messageListSenderAboveSubject", false)
isShowMessageListStars = storage.getBoolean("messageListStars", true)
messageListPreviewLines = storage.getInt("messageListPreviewLines", 2)
@ -424,7 +424,7 @@ object K9 : EarlyInit {
editor.putString("quietTimeEnds", quietTimeEnds)
editor.putBoolean("messageListSenderAboveSubject", isMessageListSenderAboveSubject)
editor.putBoolean("hideSpecialAccounts", isHideSpecialAccounts)
editor.putBoolean("hideSpecialAccounts", !isShowUnifiedInbox)
editor.putBoolean("messageListStars", isShowMessageListStars)
editor.putInt("messageListPreviewLines", messageListPreviewLines)
editor.putBoolean("showCorrespondentNames", isShowCorrespondentNames)

View file

@ -70,7 +70,7 @@ public abstract class AccountList extends K9ListActivity implements OnItemClickL
public void populateListView(List<Account> realAccounts) {
List<BaseAccount> accounts = new ArrayList<>();
if (displaySpecialAccounts() && !K9.isHideSpecialAccounts()) {
if (displaySpecialAccounts() && K9.isShowUnifiedInbox()) {
BaseAccount unifiedInboxAccount = SearchAccount.createUnifiedInboxAccount();
accounts.add(unifiedInboxAccount);
}

View file

@ -394,15 +394,15 @@ open class MessageList :
search!!.addAccountUuid(accountUuid)
search!!.addAllowedFolder(folderId)
} else {
if (K9.isHideSpecialAccounts) {
if (K9.isShowUnifiedInbox) {
account = null
search = SearchAccount.createUnifiedInboxAccount().relatedSearch
} else {
account = preferences.defaultAccount
search = LocalSearch()
search!!.addAccountUuid(account!!.uuid)
val folderId = defaultFolderProvider.getDefaultFolder(account!!)
search!!.addAllowedFolder(folderId)
} else {
account = null
search = SearchAccount.createUnifiedInboxAccount().relatedSearch
}
}
}

View file

@ -5,7 +5,7 @@ import com.fsck.k9.K9
data class MessageListActivityAppearance(
val appTheme: K9.AppTheme,
val k9Language: String,
val isHideSpecialAccounts: Boolean,
val isShowUnifiedInbox: Boolean,
val isShowMessageListStars: Boolean,
val isShowCorrespondentNames: Boolean,
val isMessageListSenderAboveSubject: Boolean,
@ -36,7 +36,7 @@ data class MessageListActivityAppearance(
fun create() = MessageListActivityAppearance(
appTheme = K9.appTheme,
k9Language = K9.k9Language,
isHideSpecialAccounts = K9.isHideSpecialAccounts,
isShowUnifiedInbox = K9.isShowUnifiedInbox,
isShowMessageListStars = K9.isShowMessageListStars,
isShowCorrespondentNames = K9.isShowCorrespondentNames,
isMessageListSenderAboveSubject = K9.isMessageListSenderAboveSubject,

View file

@ -106,7 +106,7 @@ class K9Drawer(private val parent: MessageList, savedInstanceState: Bundle?) : K
.withActivity(parent)
.withHeaderBackground(R.drawable.drawer_header_background)
if (!K9.isHideSpecialAccounts) {
if (K9.isShowUnifiedInbox) {
headerBuilder.addProfiles(
ProfileDrawerItem()
.withNameShown(true)

View file

@ -22,7 +22,7 @@ class GeneralSettingsDataStore(
return when (key) {
"fixed_message_view_theme" -> K9.isFixedMessageViewTheme
"animations" -> K9.isShowAnimations
"show_unified_inbox" -> !K9.isHideSpecialAccounts
"show_unified_inbox" -> K9.isShowUnifiedInbox
"messagelist_stars" -> K9.isShowMessageListStars
"messagelist_show_correspondent_names" -> K9.isShowCorrespondentNames
"messagelist_sender_above_subject" -> K9.isMessageListSenderAboveSubject
@ -50,7 +50,7 @@ class GeneralSettingsDataStore(
when (key) {
"fixed_message_view_theme" -> K9.isFixedMessageViewTheme = value
"animations" -> K9.isShowAnimations = value
"show_unified_inbox" -> K9.isHideSpecialAccounts = !value
"show_unified_inbox" -> K9.isShowUnifiedInbox = value
"messagelist_stars" -> K9.isShowMessageListStars = value
"messagelist_show_correspondent_names" -> K9.isShowCorrespondentNames = value
"messagelist_sender_above_subject" -> K9.isMessageListSenderAboveSubject = value