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

Calendar colors: Don't overwrite when not set by server #850

Closed
1 task done
rfc2822 opened this issue Jun 12, 2024 · 14 comments · Fixed by #971
Closed
1 task done

Calendar colors: Don't overwrite when not set by server #850

rfc2822 opened this issue Jun 12, 2024 · 14 comments · Fixed by #971
Assignees
Labels
enhancement New feature or request need info Further information needed to continue

Comments

@rfc2822
Copy link
Member

rfc2822 commented Jun 12, 2024

Scope

  • I'm sure that this feature request belongs here and not into Discussions.

Description

  1. When a server does not send a calendar color we don't need to overwrite it with our "green" every time (only use green when calendar is created). Users can then change the calendar color with a third party app and DAVx5 won't overwrite the changes.
  2. Maybe we shouldn't use green for all unknown calendars but select random? different colors. People don't see only green calendars then without possibility to distinguish between them.

Further info

Can we just not update the calendar color in LocalCalendar.update() when it's null from the server? (But of course set it in LocalCalendar.create, otherwise the calendar will be transparent)

@rfc2822 rfc2822 added the enhancement New feature or request label Jun 12, 2024
@djagoo
Copy link

djagoo commented Jul 6, 2024

Or if it's not fully out of scope of the app, please integrate a color picker to set the calendar colors manually. I just disabled the calendar color sync in DAVx and noticed that even then the tasks.org app doesn't let me change the colors. The same with jtx. And the "Calendar Color" App mentioned on https://www.davx5.com/faq/change-calendar-color/ is very old and doesn't support tasks-lists without calendar.

Has anybody a workaround for my usecase? My caldav provider (vikunja) doesn't seem to support synced calendar colors atm.

@christian179717
Copy link

Isn't that a bug? I don't want to force you to anything, and I'm thankful for developing, but after a while it's a bit annoying that the color changes always to complete different one, which I don't expect.

@rfc2822
Copy link
Member Author

rfc2822 commented Aug 12, 2024

Which one would you expect, when the server doesn't send one?
Did you disable the "manage calendar colors" setting in the Account settings?
Did you set them with a calendar app or a seperate app? Which one?

I think we have all necessary information

@rfc2822 rfc2822 linked a pull request Aug 12, 2024 that will close this issue
4 tasks
@rfc2822 rfc2822 self-assigned this Aug 13, 2024
@christian179717
Copy link

christian179717 commented Oct 23, 2024

Sadly, even with the newest version of davx5, the colors still change. If I move the option "Manage calendar colors" to "Calendar colors can be set by other apps" I can edit the colors, but after a while they'll be overwritten by davx5 with random colors.
I think the colors consists if I toggle it to "Calendar colors are reset at each sync" but that's not really what I want.
The colors even change after a few moments if "Calendar colors are reset at each sync" is enabled.
The server sadly doesn't provide the colors I need, so I fixed it with toggling this to the "Calendar colors can be set by other apps" and edited them. But since the v4.4.0.1-ose Update (or the ones before or past) this sadly doesn't work anymore.

@rfc2822 rfc2822 reopened this Oct 24, 2024
@rfc2822 rfc2822 removed their assignment Oct 24, 2024
@rfc2822
Copy link
Member Author

rfc2822 commented Oct 25, 2024

Sadly, even with the newest version of davx5, the colors still change. If I move the option "Manage calendar colors" to "Calendar colors can be set by other apps" I can edit the colors, but after a while they'll be overwritten by davx5 with random colors.
I think the colors consists if I toggle it to "Calendar colors are reset at each sync" but that's not really what I want.
The colors even change after a few moments if "Calendar colors are reset at each sync" is enabled.
The server sadly doesn't provide the colors I need, so I fixed it with toggling this to the "Calendar colors can be set by other apps" and edited them. But since the v4.4.0.1-ose Update (or the ones before or past) this sadly doesn't work anymore.

I can't reproduce it with the latest 4.4.3.2 / main branch. I have set DAVx5 to "Calendar colors can be set by other apps" and changed the color in Etar and it doesn't switch back at sync, as expected.

Can you please provide exact steps to reproduce the problem?

@rfc2822 rfc2822 added the need info Further information needed to continue label Oct 25, 2024
@christian179717
Copy link

If I refresh the Calenders in my calendar app, first the colors were synced, but after a while a few moments after sync till a few hours, the colors suddenly change.
If I activate the edit calendar color in other apps, I can edit them (what I can whenever I want normally), but after a few moments till a few hours they'll be overwritten by davx5.
Is there a difference between 4.4.3.2-ose to 4.4.3.2 / main branch?
I've tried to make a video of the change, but I didn't get the moment of the change. I hope I'm able to make a video in the next few days, so I can give you more detailed information.

Maybe it helps you, if you know, which calendar app I use: Fossify Calendar

@rfc2822
Copy link
Member Author

rfc2822 commented Oct 27, 2024

Is there a difference between 4.4.3.2-ose to 4.4.3.2 / main branch?

No, not regarding that.

Maybe it helps you, if you know, which calendar app I use: Fossify Calendar

Couldn't reproduce it with Fossify Calendar, too:

  1. Set up DAVx5 with a calendar
  2. Set DAVx5 to "Calendar colors can be set by other apps"
  3. Change the calendar color locally in Fossify Calendar
  4. Sync again
  5. Color stays the same (also in Fossify Calendar)
  6. Set DAVx5 to "Calendar colors are reset at each sync"
  7. Sync
  8. Color is reset to server color (also in Fossify Calendar)

Can you

  1. Enable verbose logging in DAVx5,
  2. do the process that resets the color,
  3. send the logs zip to [email protected] with reference to this discussion?

The logs contain everything DAVx5 does and why.

@christian179717
Copy link

christian179717 commented Oct 27, 2024

I just edited the colors in the way I want to record the change after that. Even while that, the colors changed.

Settings screenshot

Screenshot_20241027_124646_at bitfire davdroid

https://drive.filen.io/d/d28dd84a-a216-4ecb-982d-44596b0bcf5d#Ot1nPkzUPW9Bf9uElDJoNvcDwMPhJJle (sadly to big for GitHub)

If done that before you write your last message, I'll follow your instructions in just a second.

@rfc2822
Copy link
Member Author

rfc2822 commented Oct 30, 2024

Maybe related to FossifyOrg/Calendar#339

@sunkup
Copy link
Member

sunkup commented Oct 30, 2024

Nope, can't reproduce it either.

Maybe related to FossifyOrg/Calendar#339

Seems not to be a valid bug.

@christian179717
Copy link

So you've no idea how to fix it or if there's something set upped false on my mobile?

@sunkup
Copy link
Member

sunkup commented Oct 31, 2024

So you've no idea how to fix it or if there's something set upped false on my mobile?

We received your email with the logs, but you did not enable "verbose logging". It needs to be active while the calendar colors are reset. Can you do that and send the logs again?

We also tried to reproduce it again - even with mailbox.org and Fossify Calendar - but were not succesful.

Does it work with the Etar Calendar? Maybe it's the Fossify Calendar on your phone acting strange?

Also maybe try to deactivate / uninstall Google Calendar? Maybe it's doing something in the background ...

As long as we can't reproduce it, it's unfixable.

@christian179717
Copy link

I've tried it with another android device, there I could edit the colors without any problems. I reinstalled DAVx5 and Fossify Calendar on my Phone and configured it new, that sadly didn't help. But I watched that the calendar colors always changed to the same values, so I realized that it have to be another calendar app that is the issue. What I find strange is that it worked without any difficulties until DAVx5 updated and first there were random colors and now another calendar app make problems.

Now I deactivated via the ADB the Android-Calendar. After that the colors aren't overwritten anymore, but it seems that only seven colors were saved and if I edit the eighth one another color switches to a light blue. Is this issue (general for android, I don't think the issue is DAVx5) known to you, or did it occur somewhere else before?

Android Version 9
EMUI 9.1.0

@sunkup
Copy link
Member

sunkup commented Nov 11, 2024

It's the first time I hear of this happening. Good to hear you are making progress though!

Since your issue is not DAVx5 related then, I will close this issue now. We can continue our conversation via email.

@sunkup sunkup closed this as completed Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request need info Further information needed to continue
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants