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

Commit 061b97df authored by Vincent Bourgmayer's avatar Vincent Bourgmayer
Browse files

Merge branch '6098-calendar-color-change' into 'main'

feat: enable event color syncing by default.

See merge request !125
parents 331889ec 1f3d3300
Loading
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ class AccountSettings(

    companion object {

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

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

        const val ENABLED_EVENT_COLORS = "1"

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

            bundle.putString(KEY_EVENT_COLORS, ENABLED_EVENT_COLORS)

            addUserIdToBundle(
                bundle = bundle,
                url = url,
+8 −0
Original line number Diff line number Diff line
@@ -50,6 +50,14 @@ class AccountSettingsMigrations(
    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
     * corresponding PeriodicSyncWorkers