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

Commit 1f3d3300 authored by Vincent Bourgmayer's avatar Vincent Bourgmayer
Browse files

feat: enable event color syncing by default.

parent 331889ec
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -59,7 +59,7 @@ class AccountSettings(


    companion object {
    companion object {


        const val CURRENT_VERSION = 14
        const val CURRENT_VERSION = 15
        const val KEY_SETTINGS_VERSION = "version"
        const val KEY_SETTINGS_VERSION = "version"


        const val KEY_SYNC_INTERVAL_ADDRESSBOOKS = "sync_interval_addressbooks"
        const val KEY_SYNC_INTERVAL_ADDRESSBOOKS = "sync_interval_addressbooks"
@@ -104,6 +104,8 @@ class AccountSettings(
                 "1"                     true */
                 "1"                     true */
        const val KEY_EVENT_COLORS = "event_colors"
        const val KEY_EVENT_COLORS = "event_colors"


        const val ENABLED_EVENT_COLORS = "1"

        /** Contact group method:
        /** Contact group method:
         *null (not existing)*     groups as separate vCards (default);
         *null (not existing)*     groups as separate vCards (default);
         "CATEGORIES"              groups are per-contact CATEGORIES
         "CATEGORIES"              groups are per-contact CATEGORIES
@@ -163,6 +165,8 @@ class AccountSettings(
                bundle.putString(NCAccountUtils.Constants.KEY_OC_BASE_URL, baseUrl)
                bundle.putString(NCAccountUtils.Constants.KEY_OC_BASE_URL, baseUrl)
            }
            }


            bundle.putString(KEY_EVENT_COLORS, ENABLED_EVENT_COLORS)

            addUserIdToBundle(
            addUserIdToBundle(
                bundle = bundle,
                bundle = bundle,
                url = url,
                url = url,
+8 −0
Original line number Original line Diff line number Diff line
@@ -50,6 +50,14 @@ class AccountSettingsMigrations(
    val accountSettings: AccountSettings
    val accountSettings: AccountSettings
) {
) {


    /**
     * We may get upstream conflict for later update because of version number.
     * from Murena's Squad
     */
    fun update_14_15() {
        accountSettings.setEventColors(true)
    }

    /**
    /**
     * Disables all sync adapter periodic syncs for every authority. Then enables
     * Disables all sync adapter periodic syncs for every authority. Then enables
     * corresponding PeriodicSyncWorkers
     * corresponding PeriodicSyncWorkers