Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3e0b89f authored by cketti's avatar cketti
Browse files

Rename K9.isHideSpecialAccounts to K9.isShowUnifiedInbox

parent bcb9c2f8
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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)
+1 −1
Original line number Diff line number Diff line
@@ -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);
        }
+4 −4
Original line number Diff line number Diff line
@@ -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
                }
            }
        }
+2 −2
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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)
Loading