diff --git a/app/src/main/kotlin/at/bitfire/davdroid/settings/AccountSettings.kt b/app/src/main/kotlin/at/bitfire/davdroid/settings/AccountSettings.kt index b1254f60707013478410ae91d525286f1b54f3ae..f13aa8f6c55f359952743847c173b21876e5861f 100644 --- a/app/src/main/kotlin/at/bitfire/davdroid/settings/AccountSettings.kt +++ b/app/src/main/kotlin/at/bitfire/davdroid/settings/AccountSettings.kt @@ -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, diff --git a/app/src/main/kotlin/at/bitfire/davdroid/settings/AccountSettingsMigrations.kt b/app/src/main/kotlin/at/bitfire/davdroid/settings/AccountSettingsMigrations.kt index 6e2bed802bda17bb796fd946b4901716d65f0289..f39ff8038c00c641a6d1ded12a47abc23bbb92d1 100644 --- a/app/src/main/kotlin/at/bitfire/davdroid/settings/AccountSettingsMigrations.kt +++ b/app/src/main/kotlin/at/bitfire/davdroid/settings/AccountSettingsMigrations.kt @@ -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