Commit f94d2f7a authored by Ricki Hirner's avatar Ricki Hirner 🐑

Add support for event colors

parent a88a418f
Pipeline #10685277 passed with stage
in 4 minutes and 11 seconds
......@@ -90,7 +90,6 @@ dependencies {
compile 'dnsjava:dnsjava:2.1.8'
compile 'org.apache.commons:commons-lang3:3.6'
compile 'org.apache.commons:commons-collections4:4.1'
provided 'org.projectlombok:lombok:1.16.16'
// for tests
//noinspection GradleDynamicVersion
......
......@@ -44,7 +44,6 @@ class LocalCalendar private constructor(
)
@JvmStatic
@Throws(CalendarStorageException::class)
fun create(account: Account, provider: ContentProviderClient, info: CollectionInfo): Uri {
val values = valuesFromCollectionInfo(info, true)
......@@ -57,8 +56,12 @@ class LocalCalendar private constructor(
// flag as visible & synchronizable at creation, might be changed by user at any time
values.put(Calendars.VISIBLE, 1)
values.put(Calendars.SYNC_EVENTS, 1)
val uri = create(account, provider, values)
return create(account, provider, values)
// create calendar colors
AndroidCalendar.insertColors(provider, account)
return uri
}
private fun valuesFromCollectionInfo(info: CollectionInfo, withColor: Boolean): ContentValues {
......
Subproject commit 17f269632224ee7332fdf2a8bf6d3c0952e269e1
Subproject commit d501bd45f2391edb3dafeb737f20e0860e91475d
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment