-
-
Notifications
You must be signed in to change notification settings - Fork 111
Synctools: AndroidEvent companion object moved #1572
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
Conversation
There was a problem hiding this 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 updates the Synctools dependency, refactors LocalCalendar instantiation to use Hilt and Dagger Assisted, and introduces Hilt setup in calendar tests.
- Bumps
bitfire-synctoolsversion in Gradle - Converts
LocalCalendarto an assisted-injected class and updates usage - Adds Hilt rules and injects factories in Android tests
- Replaces custom
DateUtilstimezone lookup with ICal4j registry
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| gradle/libs.versions.toml | Updated bitfire-synctools version |
| app/src/main/kotlin/.../LocalCalendarStore.kt | Injected LocalCalendar.Factory and replaced direct calls |
| app/src/main/kotlin/.../LocalCalendar.kt | Converted to @AssistedInject with a Factory interface |
| app/src/main/kotlin/.../DavCollectionRepository.kt | Switched timezone lookup to TimeZoneRegistryFactory |
| app/src/androidTest/.../LocalEventTest.kt | Added Hilt rules, injected factory, removed static setup |
| app/src/androidTest/.../LocalCalendarTest.kt | Added Hilt rules, injected factory, removed static setup |
Comments suppressed due to low confidence (2)
app/src/androidTest/kotlin/at/bitfire/davdroid/resource/LocalEventTest.kt:46
- [nitpick] The field name 'localcalendarFactory' does not follow camelCase convention; consider renaming to 'localCalendarFactory' for consistency.
lateinit var localcalendarFactory: LocalCalendar.Factory
app/src/main/kotlin/at/bitfire/davdroid/repository/DavCollectionRepository.kt:421
- Creating a new TimeZoneRegistry on each call can be expensive; consider caching the registry instance to avoid repeated initialization.
val tzRegistry = TimeZoneRegistryFactory.getInstance().createRegistry()
|
This PR/issue depends on: |
sunkup
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good :)
Updates synctools and introduces Hilt for
LocalCalendar.Depends on bitfireAT/synctools#38
TODO: Update commit ID when above PR is merged