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

Commit d6d8ccdf authored by cketti's avatar cketti
Browse files

Remove "Start in Unified Inbox" setting

parent f60477cb
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -232,9 +232,6 @@ object K9 : EarlyInit {
    @JvmStatic
    var isUseVolumeKeysForListNavigation = false

    @JvmStatic
    var isStartInUnifiedInbox = false

    @JvmStatic
    var isHideSpecialAccounts = false

@@ -352,7 +349,6 @@ object K9 : EarlyInit {
        isGesturesEnabled = storage.getBoolean("gesturesEnabled", false)
        isUseVolumeKeysForNavigation = storage.getBoolean("useVolumeKeysForNavigation", false)
        isUseVolumeKeysForListNavigation = storage.getBoolean("useVolumeKeysForListNavigation", false)
        isStartInUnifiedInbox = storage.getBoolean("startIntegratedInbox", false)
        isHideSpecialAccounts = storage.getBoolean("hideSpecialAccounts", false)
        isMessageListSenderAboveSubject = storage.getBoolean("messageListSenderAboveSubject", false)
        isShowMessageListStars = storage.getBoolean("messageListStars", true)
@@ -438,7 +434,6 @@ object K9 : EarlyInit {
        editor.putString("quietTimeStarts", quietTimeStarts)
        editor.putString("quietTimeEnds", quietTimeEnds)

        editor.putBoolean("startIntegratedInbox", isStartInUnifiedInbox)
        editor.putBoolean("messageListSenderAboveSubject", isMessageListSenderAboveSubject)
        editor.putBoolean("hideSpecialAccounts", isHideSpecialAccounts)
        editor.putBoolean("messageListStars", isShowMessageListStars)
+0 −3
Original line number Diff line number Diff line
@@ -181,9 +181,6 @@ public class GlobalSettings {
        s.put("sortAscending", Settings.versions(
                new V(10, new BooleanSetting(Account.DEFAULT_SORT_ASCENDING))
        ));
        s.put("startIntegratedInbox", Settings.versions(
                new V(1, new BooleanSetting(false))
        ));
        s.put("theme", Settings.versions(
                new V(1, new LegacyThemeSetting(AppTheme.LIGHT)),
                new V(58, new ThemeSetting(AppTheme.FOLLOW_SYSTEM))
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ public class Settings {
     *
     * @see SettingsExporter
     */
    public static final int VERSION = 59;
    public static final int VERSION = 60;

    static Map<String, Object> validate(int version, Map<String, TreeMap<Integer, SettingsDescription>> settings,
            Map<String, String> importedSettings, boolean useDefaultValues) {
+0 −2
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ class GeneralSettingsDataStore(
            "threaded_view" -> K9.isThreadedViewEnabled
            "messageview_fixedwidth_font" -> K9.isUseMessageViewFixedWidthFont
            "messageview_autofit_width" -> K9.isAutoFitWidth
            "start_integrated_inbox" -> K9.isStartInUnifiedInbox
            "gestures" -> K9.isGesturesEnabled
            "messageview_return_to_list" -> K9.isMessageViewReturnToList
            "messageview_show_next" -> K9.isMessageViewShowNext
@@ -66,7 +65,6 @@ class GeneralSettingsDataStore(
            "threaded_view" -> K9.isThreadedViewEnabled = value
            "messageview_fixedwidth_font" -> K9.isUseMessageViewFixedWidthFont = value
            "messageview_autofit_width" -> K9.isAutoFitWidth = value
            "start_integrated_inbox" -> K9.isStartInUnifiedInbox = value
            "gestures" -> K9.isGesturesEnabled = value
            "messageview_return_to_list" -> K9.isMessageViewReturnToList = value
            "messageview_show_next" -> K9.isMessageViewShowNext = value
+0 −13
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ class GeneralSettingsFragment : PreferenceFragmentCompat() {
        setPreferencesFromResource(R.xml.general_settings, rootKey)

        initializeTheme()
        initializeStartInUnifiedInbox()
    }

    override fun onActivityCreated(savedInstanceState: Bundle?) {
@@ -36,21 +35,9 @@ class GeneralSettingsFragment : PreferenceFragmentCompat() {
        }
    }

    private fun initializeStartInUnifiedInbox() {
        findPreference(PREFERENCE_START_IN_UNIFIED_INBOX)?.apply {
            if (hideSpecialAccounts()) {
                isEnabled = false
            }
        }
    }

    private fun hideSpecialAccounts() = dataStore.getBoolean(PREFERENCE_HIDE_SPECIAL_ACCOUNTS, false)


    companion object {
        private const val PREFERENCE_THEME = "theme"
        private const val PREFERENCE_START_IN_UNIFIED_INBOX = "start_integrated_inbox"
        private const val PREFERENCE_HIDE_SPECIAL_ACCOUNTS = "hide_special_accounts"

        fun create(rootKey: String? = null) = GeneralSettingsFragment().withArguments(ARG_PREFERENCE_ROOT to rootKey)
    }
Loading