Conversation
There was a problem hiding this comment.
Looks good.
At least very few words in the PR description would be helpful to know what this PR aims to do and why.
For merging it would be good if it could be merged together with a davx5-ose PR (that should be referenced in this PR and the other way round) that reflects the changes in DAVx5 (so that there's never a situation where the newest synctools can't be used in DAVx5).
There was a problem hiding this comment.
Pull request overview
This PR refactors the task list handling to disallow subclassing of DmfsTaskList, making it analogous to how AndroidCalendar and LocalCalendar are already structured. This change removes the factory pattern in favor of direct instantiation.
Key changes:
- Removed the factory pattern by deleting
DmfsTaskListFactoryinterface and removing generic type parameters from factory methods - Made
DmfsTaskLista final class (removedopenkeyword) to prevent subclassing - Converted
TestTaskListfrom a subclass to an object with a factory method that returnsDmfsTaskList
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| lib/src/main/kotlin/at/bitfire/ical4android/DmfsTaskListFactory.kt | Removed the factory interface entirely as it's no longer needed |
| lib/src/main/kotlin/at/bitfire/ical4android/DmfsTaskList.kt | Made class final, removed Factory object, and simplified findByID and find methods to return DmfsTaskList directly |
| lib/src/androidTest/kotlin/at/bitfire/ical4android/impl/TestTaskList.kt | Converted from a subclass to an object with a create() factory method returning DmfsTaskList |
| lib/src/androidTest/kotlin/at/bitfire/ical4android/DmfsTaskTest.kt | Updated variable type from TestTaskList to DmfsTaskList |
| lib/src/androidTest/kotlin/at/bitfire/ical4android/DmfsTaskListTest.kt | Removed TestTaskList import and updated findByID call to remove factory parameter |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Rewrite of tasks handling in synctools to separate layers for storage + mapping. See #116
Disallows subclassing of DmfsTaskList (LocalTaskList in DAVx⁵) analogous to how it is already the case for AndroidCalendar and LocalCalendar.
Required for bitfireAT/davx5-ose#1882