Skip to content

Conversation

@rfc2822
Copy link
Member

@rfc2822 rfc2822 commented Jul 9, 2025

Updates synctools and introduces Hilt for LocalCalendar.

Depends on bitfireAT/synctools#38

TODO: Update commit ID when above PR is merged

@rfc2822 rfc2822 self-assigned this Jul 9, 2025
@rfc2822 rfc2822 added the refactoring Internal improvement of existing functions label Jul 9, 2025
@rfc2822 rfc2822 requested a review from Copilot July 9, 2025 13:09
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 updates the Synctools dependency, refactors LocalCalendar instantiation to use Hilt and Dagger Assisted, and introduces Hilt setup in calendar tests.

  • Bumps bitfire-synctools version in Gradle
  • Converts LocalCalendar to an assisted-injected class and updates usage
  • Adds Hilt rules and injects factories in Android tests
  • Replaces custom DateUtils timezone 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()

@rfc2822 rfc2822 requested a review from sunkup July 9, 2025 13:16
@rfc2822 rfc2822 marked this pull request as ready for review July 9, 2025 13:16
@github-actions github-actions bot removed the dependent label Jul 9, 2025
@github-actions
Copy link

github-actions bot commented Jul 9, 2025

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.

Looks good :)

@github-project-automation github-project-automation bot moved this from Todo to In Progress in DAVx⁵ Releases Jul 9, 2025
@rfc2822 rfc2822 merged commit 4e2640c into main-ose Jul 9, 2025
9 of 10 checks passed
@rfc2822 rfc2822 deleted the androidevent-companion branch July 9, 2025 14:35
@github-project-automation github-project-automation bot moved this from In Progress to Done in DAVx⁵ Releases Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring Internal improvement of existing functions

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants