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 a46eb9898..f3e6b21c8 100644 --- a/app/core/src/main/java/com/fsck/k9/K9.kt +++ b/app/core/src/main/java/com/fsck/k9/K9.kt @@ -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) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/AccountList.java b/app/ui/legacy/src/main/java/com/fsck/k9/activity/AccountList.java index 0972e50e8..922d5ba30 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/AccountList.java +++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/AccountList.java @@ -70,7 +70,7 @@ public abstract class AccountList extends K9ListActivity implements OnItemClickL public void populateListView(List realAccounts) { List accounts = new ArrayList<>(); - if (displaySpecialAccounts() && !K9.isHideSpecialAccounts()) { + if (displaySpecialAccounts() && K9.isShowUnifiedInbox()) { BaseAccount unifiedInboxAccount = SearchAccount.createUnifiedInboxAccount(); accounts.add(unifiedInboxAccount); } diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt index 7c98ec93c..77d4da9ad 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt @@ -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 } } } diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageListActivityAppearance.kt b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageListActivityAppearance.kt index 94aaa1071..7d8bba2c1 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageListActivityAppearance.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageListActivityAppearance.kt @@ -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, diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/K9Drawer.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/K9Drawer.kt index 7f4818093..5f51230ed 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/K9Drawer.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/K9Drawer.kt @@ -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) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsDataStore.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsDataStore.kt index 007028337..1b3d01c30 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsDataStore.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsDataStore.kt @@ -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