Skip to content

Remove dead code for jCard contact processing#2079

Merged
rfc2822 merged 3 commits intomainfrom
1968-drop-unused-jcard-support
Mar 27, 2026
Merged

Remove dead code for jCard contact processing#2079
rfc2822 merged 3 commits intomainfrom
1968-drop-unused-jcard-support

Conversation

@rfc2822
Copy link
Copy Markdown
Member

@rfc2822 rfc2822 commented Mar 16, 2026

Removal of dead jCard support code which is never actually used because jCard support is commented out:

  • Eliminated the hasJCard variable and all logic related to checking for and handling jCard support in ContactsSyncManager. [1] [2]
  • Removed jCard-specific branches from contact writing and content type handling, so the code now only processes vCard formats. [1] [2]
  • Simplified the processCard method and its invocation by removing the jCard parameter and always passing jCard = false to Contact.fromReader. [1] [2]

Codebase cleanup:

  • Removed the MEDIA_TYPE_JCARD constant from DavUtils, as it is no longer needed.

@rfc2822 rfc2822 linked an issue Mar 16, 2026 that may be closed by this pull request
@rfc2822 rfc2822 self-assigned this Mar 16, 2026
rfc2822 added 2 commits March 27, 2026 11:05
* Remove MEDIA_TYPE_JCARD constant
* Remove hasJCard flag and related logic
* Simplify contact processing to use vCard only
* Update processCard to remove jCard parameter
@rfc2822 rfc2822 force-pushed the 1968-drop-unused-jcard-support branch from 9b633eb to 0568d17 Compare March 27, 2026 10:05
@rfc2822 rfc2822 changed the title Remove jCard support during contact processing Remove dead code for jCard contact processing Mar 27, 2026
@rfc2822 rfc2822 requested a review from Copilot March 27, 2026 10:55
Copy link
Copy Markdown
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

Removes unused jCard handling from CardDAV contact sync, aligning the implementation with the fact that jCard support is effectively disabled and simplifying the sync code to only process vCard payloads.

Changes:

  • Removed jCard capability tracking and all jCard-specific branches in contact upload/download handling.
  • Simplified processCard by removing the jCard parameter and always parsing as vCard.
  • Removed the unused MEDIA_TYPE_JCARD constant from DavUtils.

Reviewed changes

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

File Description
core/src/main/kotlin/at/bitfire/davdroid/util/DavUtils.kt Removes the jCard media type constant now that jCard is no longer used.
core/src/main/kotlin/at/bitfire/davdroid/sync/ContactsSyncManager.kt Deletes jCard capability/branches and simplifies parsing/upload logic to vCard only.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

* Remove unused imports and constants
* Simplify contact processing to use vCard only
* Update bitfire-synctools dependency
Copy link
Copy Markdown
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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rfc2822 rfc2822 marked this pull request as ready for review March 27, 2026 13:30
@rfc2822 rfc2822 requested a review from a team as a code owner March 27, 2026 13:30
@rfc2822 rfc2822 merged commit 68fb35a into main Mar 27, 2026
8 of 9 checks passed
@rfc2822 rfc2822 deleted the 1968-drop-unused-jcard-support branch March 27, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drop unused jCard support (dead code)

2 participants