Skip to content

Conversation

rfc2822
Copy link
Member

@rfc2822 rfc2822 commented Jul 1, 2025

Depends on bitfireAT/synctools#28

TODO: adapt commit ID when above PR is merged

@rfc2822 rfc2822 force-pushed the androidcalendar-refactoring branch from bca0910 to 760fc2f Compare July 2, 2025 19:52
@rfc2822 rfc2822 marked this pull request as ready for review July 2, 2025 19:52
@rfc2822 rfc2822 requested a review from Copilot July 2, 2025 19:52
Copy link
Contributor

@Copilot 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

Refactors Android calendar interactions by replacing ical4android with the new synctools provider API and consolidates logging to use the shared synctools formatter.

  • Bumps the bitfire-synctools dependency to the new commit ID.
  • Swaps all imports and calls from at.bitfire.ical4android.* to at.bitfire.synctools.*, introducing AndroidCalendarProvider methods.
  • Removes the local PlainTextFormatter and its tests in favor of the one provided by synctools, and updates logging handlers accordingly.

Reviewed Changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.

Show a summary per file
File Description
gradle/libs.versions.toml Updated bitfire-synctools commit ID
app/src/test/kotlin/at/bitfire/davdroid/log/PlainTextFormatterTest.kt Removed local formatter tests
app/src/main/kotlin/at/bitfire/davdroid/ui/widget/CalendarColorPickerDialog.kt Swapped Css3Color import to synctools
app/src/main/kotlin/at/bitfire/davdroid/ui/account/CreateCalendarScreen.kt Swapped Css3Color import to synctools
app/src/main/kotlin/at/bitfire/davdroid/ui/account/CreateCalendarModel.kt Swapped Css3Color import and reordered imports
app/src/main/kotlin/at/bitfire/davdroid/sync/CalendarSyncer.kt Replaced AndroidCalendar static calls with AndroidCalendarProvider
app/src/main/kotlin/at/bitfire/davdroid/settings/migration/AccountSettingsMigration7.kt Replaced color migration calls with provider API
app/src/main/kotlin/at/bitfire/davdroid/settings/migration/AccountSettingsMigration10.kt Refactored sync-adapter calls and imports
app/src/main/kotlin/at/bitfire/davdroid/settings/migration/AccountSettingsMigration20.kt Replaced bulk calendar queries/updates with provider methods
app/src/main/kotlin/at/bitfire/davdroid/resource/LocalDataStore.kt Renamed provider parameter to client
app/src/main/kotlin/at/bitfire/davdroid/resource/LocalCalendarStore.kt Refactored create/getAll/update to use AndroidCalendarProvider
app/src/main/kotlin/at/bitfire/davdroid/resource/LocalCalendar.kt Converted all query/update calls to provider-based API
app/src/main/kotlin/at/bitfire/davdroid/log/StringHandler.kt Swapped formatter import to synctools
app/src/main/kotlin/at/bitfire/davdroid/log/PlainTextFormatter.kt Removed local formatter implementation
app/src/main/kotlin/at/bitfire/davdroid/log/LogcatHandler.kt Removed local handler
app/src/main/kotlin/at/bitfire/davdroid/log/LogManager.kt Swapped in synctools LogcatHandler constructor call
app/src/main/kotlin/at/bitfire/davdroid/log/LogFileHandler.kt Imported synctools formatter
app/src/androidTest/kotlin/at/bitfire/davdroid/settings/migration/AccountSettingsMigration20Test.kt Aligned test queries to new provider usage
app/src/androidTest/kotlin/at/bitfire/davdroid/resource/LocalEventTest.kt Swapped test provider to client and provider-based setup
app/src/androidTest/kotlin/at/bitfire/davdroid/resource/LocalCalendarTest.kt Swapped test provider to client and provider-based setup
app/src/androidTest/kotlin/at/bitfire/davdroid/HiltTestRunner.kt Updated root logger setup to use synctools LogcatHandler
Comments suppressed due to low confidence (2)

app/src/main/kotlin/at/bitfire/davdroid/log/LogManager.kt:83

  • [nitpick] Since you’re adding a new handler on every initialization, you may end up with duplicate log outputs if this runs multiple times. Consider clearing existing handlers first or ensuring this is only called once.
        rootLogger.addHandler(LogcatHandler(BuildConfig.APPLICATION_ID))

@rfc2822 rfc2822 requested a review from sunkup July 3, 2025 13:07
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. Just the commit id needs to be updated once more.

@github-project-automation github-project-automation bot moved this from Todo to In Progress in DAVx⁵ Releases Jul 3, 2025
@github-actions github-actions bot removed the dependent label Jul 3, 2025
Copy link

github-actions bot commented Jul 3, 2025

@rfc2822 rfc2822 merged commit 5834409 into main-ose Jul 3, 2025
10 of 13 checks passed
@rfc2822 rfc2822 deleted the androidcalendar-refactoring branch July 3, 2025 20:12
@github-project-automation github-project-automation bot moved this from In Progress to Done in DAVx⁵ Releases Jul 3, 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