Skip to content

Conversation

@rfc2822
Copy link
Member

@rfc2822 rfc2822 commented Jun 24, 2025

Moves functionality from DAVx5 LocalCalendar and LocalEvent to the library so that there's no need to override populate… and build… anymore.

To be combined with bitfireAT/davx5-ose#1544

@rfc2822 rfc2822 self-assigned this Jun 24, 2025
@rfc2822 rfc2822 added the refactoring Quality improvement of existing functions label Jun 24, 2025
@rfc2822 rfc2822 force-pushed the androidcalendar-features branch from 16e0d65 to 87f9b76 Compare June 24, 2025 13:19
@rfc2822 rfc2822 changed the title AndroidCalendar: add missing features for DAVx5 LocalCalendar Calendar storage: add missing features for DAVx5 Jun 24, 2025
@rfc2822 rfc2822 linked an issue Jun 24, 2025 that may be closed by this pull request
@rfc2822 rfc2822 force-pushed the androidcalendar-features branch from 95455ce to a4fd57f Compare June 24, 2025 20:22
@rfc2822 rfc2822 force-pushed the androidcalendar-features branch from 2878edf to 6530bba Compare June 24, 2025 20:38
@rfc2822 rfc2822 marked this pull request as ready for review June 24, 2025 21:39
@rfc2822 rfc2822 changed the title Calendar storage: add missing features for DAVx5 LocalCalendar/LocalEvent: provide all fields for DAVx5 Jun 25, 2025
@rfc2822 rfc2822 requested a review from Copilot June 25, 2025 08:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the DAVx5 LocalCalendar/LocalEvent functionality by moving field handling (such as organizer status, sync metadata, and event sequencing) into the library, eliminating the need for client-side overrides of populate/build functions.

  • Added a new isOrganizer field in Event
  • Refactored AndroidEvent constructors and methods to support library-managed fields
  • Updated AndroidCalendar and test cases to align with these changes

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lib/src/main/kotlin/at/bitfire/ical4android/Event.kt Added isOrganizer field to the Event data class
lib/src/main/kotlin/at/bitfire/ical4android/AndroidEvent.kt Made AndroidEvent an open class, introduced sync metadata fields, and refactored populate/build methods
lib/src/main/kotlin/at/bitfire/ical4android/AndroidCalendar.kt Updated calendar handling and integrated new sync state methods
lib/src/androidTest/kotlin/at/bitfire/ical4android/impl/TestEvent.kt Updated TestEvent constructor to match the new AndroidEvent structure
lib/src/androidTest/kotlin/at/bitfire/ical4android/AndroidEventTest.kt Added tests for the new sync metadata and isOrganizer handling
lib/src/androidTest/kotlin/at/bitfire/ical4android/AndroidCalendarTest.kt Adjusted color insertion tests to use the updated Css3Color.entries

@rfc2822 rfc2822 requested a review from sunkup June 25, 2025 08:11
Copy link
Member

@sunkup sunkup left a comment

Choose a reason for hiding this comment

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

I find it hard to spot errors here. Maybe we should move all the companion objects to the end of their class. I think it looks good otherwise.

@rfc2822
Copy link
Member Author

rfc2822 commented Jun 25, 2025

I find it hard to spot errors here.

Yes, me too … I think it's because the architecture is far too bad yet. But it has to start somehow.

@rfc2822 rfc2822 requested a review from sunkup June 25, 2025 10:09
@rfc2822 rfc2822 merged commit 78cacf8 into main Jun 25, 2025
9 checks passed
@rfc2822 rfc2822 deleted the androidcalendar-features branch June 25, 2025 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring Quality improvement of existing functions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

populate…() and build…() methods must not be overriden anymore

2 participants