Merged
Conversation
|
This PR/issue depends on: |
# Conflicts: # lib/src/androidTest/kotlin/at/bitfire/synctools/mapping/calendar/LegacyAndroidEventBuilder2Test.kt # lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/LegacyAndroidEventBuilder2.kt
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the Android event builder by extracting individual builder classes for specific event fields, following a similar pattern introduced in PR #67. The refactoring moves logic from the monolithic LegacyAndroidEventBuilder2 class into separate, focused builder classes, making the codebase more modular and testable.
Key changes:
- Extracted 16 new builder classes for specific event field mappings (UID, sync flags, status, sequence, etc.)
- Moved corresponding test logic into dedicated test classes for each builder
- Updated the main
LegacyAndroidEventBuilder2to use the new builder classes - Renamed
RetainedClassificationBuildertoAccessLevelBuilderwith enhanced functionality
Reviewed Changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
UidBuilder.kt |
New builder for mapping UID field to Android Events table |
TimeFieldsBuilder.kt |
Complex builder handling DTSTART, DTEND, duration, and timezone fields |
SyncIdBuilder.kt |
Builder for sync ID fields with main/exception logic |
StatusBuilder.kt |
Maps iCalendar STATUS to Android Events status values |
AccessLevelBuilder.kt |
Enhanced classification handler with access level mapping and retention logic |
LegacyAndroidEventBuilder2.kt |
Refactored main builder to use new modular builders |
| Various test files | Unit tests for each individual builder class |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/builder/ETagBuilder.kt
Outdated
Show resolved
Hide resolved
lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/builder/ETagBuilder.kt
Outdated
Show resolved
Hide resolved
Member
Author
|
@sunkup Next bunch. All builders are then now in the new style. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up of #67. Depends on #67.
Moved more builders into separate classes without changing the logic.
Tests are again refactored to respective unit test classes with the same name.