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

Unverified Commit 616b0063 authored by Wolf-Martell Montwé's avatar Wolf-Martell Montwé Committed by GitHub
Browse files

Merge pull request #8459 from shamim-emon/fix-issue-7556

Disable Unified Inbox if there's only one account
parents 7e63b051 92b9cccb
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ import app.k9mail.feature.account.setup.AccountSetupExternalContract
import app.k9mail.feature.account.setup.AccountSetupExternalContract.AccountCreator.AccountCreatorResult
import app.k9mail.legacy.account.Account.SpecialFolderSelection
import com.fsck.k9.Core
import com.fsck.k9.K9
import com.fsck.k9.Preferences
import com.fsck.k9.controller.MessagingController
import com.fsck.k9.logging.Timber
@@ -79,6 +80,11 @@ class AccountCreator(

        preferences.saveAccount(newAccount)

        if (preferences.getAccounts().size > 1) {
            K9.isShowUnifiedInbox = true
            K9.saveSettingsAsync()
        }

        Core.setServicesEnabled(context)

        messagingController.refreshFolderListBlocking(newAccount)
+2 −2
Original line number Diff line number Diff line
@@ -198,7 +198,7 @@ object K9 : KoinComponent {
    var isUseVolumeKeysForNavigation = false

    @JvmStatic
    var isShowUnifiedInbox = true
    var isShowUnifiedInbox = false

    @JvmStatic
    var isShowStarredCount = false
@@ -328,7 +328,7 @@ object K9 : KoinComponent {
        isSensitiveDebugLoggingEnabled = storage.getBoolean("enableSensitiveLogging", false)
        isShowAnimations = storage.getBoolean("animations", true)
        isUseVolumeKeysForNavigation = storage.getBoolean("useVolumeKeysForNavigation", false)
        isShowUnifiedInbox = storage.getBoolean("showUnifiedInbox", true)
        isShowUnifiedInbox = storage.getBoolean("showUnifiedInbox", false)
        isShowStarredCount = storage.getBoolean("showStarredCount", false)
        isMessageListSenderAboveSubject = storage.getBoolean("messageListSenderAboveSubject", false)
        isShowMessageListStars = storage.getBoolean("messageListStars", true)
+2 −1
Original line number Diff line number Diff line
@@ -171,7 +171,8 @@ class GeneralSettingsDescriptions {
                new V(1, new BooleanSetting(true))
        ));
        s.put("showUnifiedInbox", Settings.versions(
                new V(69, new BooleanSetting(true))
                new V(69, new BooleanSetting(true)),
                new V(101, new BooleanSetting(false))
        ));
        s.put("sortTypeEnum", Settings.versions(
                new V(10, new EnumSetting<>(SortType.class, Account.DEFAULT_SORT_TYPE))
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ class Settings {
     *
     * @see SettingsExporter
     */
    public static final int VERSION = 100;
    public static final int VERSION = 101;

    static Map<String, Object> validate(int version, Map<String, TreeMap<Integer, SettingsDescription<?>>> settings,
            Map<String, String> importedSettings, boolean useDefaultValues) {