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

Don't upload event when calendar is read only #587

Merged
merged 21 commits into from
Feb 27, 2024

Conversation

sunkup
Copy link
Member

@sunkup sunkup commented Feb 20, 2024

No description provided.

@sunkup sunkup linked an issue Feb 20, 2024 that may be closed by this pull request
@sunkup sunkup force-pushed the 572-dont-upload-event-when-calendar-is-read-only branch from 2096b64 to fbb1200 Compare February 21, 2024 11:00
@sunkup sunkup requested a review from rfc2822 February 21, 2024 13:44
@sunkup sunkup marked this pull request as ready for review February 21, 2024 13:49
@sunkup sunkup removed the request for review from rfc2822 February 21, 2024 13:50
@sunkup sunkup marked this pull request as draft February 21, 2024 13:50
@sunkup sunkup force-pushed the 572-dont-upload-event-when-calendar-is-read-only branch 2 times, most recently from 74c7d21 to 4a654f9 Compare February 22, 2024 14:03
@sunkup sunkup requested a review from rfc2822 February 22, 2024 14:14
@sunkup sunkup marked this pull request as ready for review February 22, 2024 14:14
@rfc2822 rfc2822 force-pushed the 572-dont-upload-event-when-calendar-is-read-only branch from 4a654f9 to fbc6a96 Compare February 23, 2024 09:21
@rfc2822 rfc2822 force-pushed the 572-dont-upload-event-when-calendar-is-read-only branch from 4428ba7 to 7646e16 Compare February 23, 2024 10:16
Copy link
Member

@rfc2822 rfc2822 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After having done a few changes (most important one is to get read-only in populate() – unfortunately the ical4android API is not perfect and also not well-documented), I suggest to

  • lift LocalAddress.resetDeleted() up to LocalResource.resetDeleted()
  • LocalAddress then becomes an empty abstract class that only serves as a superclass for LocalGroup and LocalContact (needs to stay an interface, because it's impossible to inherit from more than one class, LocalContact inherits already from AndroidContact)
  • for LocalCalendar, your new method markAsNotDeleted() will then override resetDeleted() instead

@sunkup sunkup requested a review from rfc2822 February 27, 2024 07:02
Copy link
Member

@rfc2822 rfc2822 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good and works as expected – this will save us from 403 on read-only calendars.

I'm not sure whether we really want to completely reset the local events on read-only events. It may be a valid use case to adapt the local alarm of otherwise read-only events (like it's possible with Etar).

However this could be topic of a follow-up issue/PR, as well as read-only handling of tasks.

@rfc2822 rfc2822 merged commit 86742f5 into dev-ose Feb 27, 2024
7 checks passed
@rfc2822 rfc2822 deleted the 572-dont-upload-event-when-calendar-is-read-only branch February 27, 2024 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't upload event when calendar is "read-only"
2 participants