Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event color is not reset when event is updated without COLOR #178

Closed
rfc2822 opened this issue Oct 28, 2024 · 1 comment · Fixed by #180
Closed

Event color is not reset when event is updated without COLOR #178

rfc2822 opened this issue Oct 28, 2024 · 1 comment · Fixed by #180
Assignees

Comments

@rfc2822
Copy link
Member

rfc2822 commented Oct 28, 2024

I use colors to mark different states of events. When all is prepared and booked I reset the color to the default, this change does not make it all the way to the calendar app on my Android phone.

My setup is:
Nextcloud 29.0.8
Etar (did not find version)
Davx5 4.4.3.2-ose

Steps to reproduce:
Create an calendar event in Nextcloud Calendar, select a color for the event.
Sync to Etar, notice that the color is set correctly.
In Nextcloud press the curvy arrow to restore color to the default, change the time of the event.
Sync again.

Actual result:
In Etar, the time is updated but the color stays the same as before.

Expected result:
Time and color of the event is updated.

Known workaround:
Do not use default color, there is no problem when changing from one color to another.

Additional information;
I have looked in the Nextcloud database and the .ics returned from the CalDav call. When the color is reset the COLOR property of the iCalendar object is removed. My Kotlin is not good enough to see how Dav5x handles the event syncing in detail, but my guess is that extra work needs to be done as the property is removed by the server.

Is this a bug or a known limitation of how Android calendars work?

Originally posted by @blip-unicorn in #177

@rfc2822
Copy link
Member Author

rfc2822 commented Oct 28, 2024

EVENT_COLOR_KEY is only evaluated when it's set:

https://android.googlesource.com/platform/packages/providers/CalendarProvider/+/refs/tags/android-15.0.0_r3/src/com/android/providers/calendar/CalendarProvider2.java#2404

So in order to reset the color property, we have to set EVENT_COLOR=null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
1 participant