Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Fixed contacts imported from vCard files being mis-sorted (filed after "Z") when their name fields contained leading or trailing whitespace ([#195])

## [1.6.0] - 2026-01-30
### Added
Expand Down Expand Up @@ -119,6 +121,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#30]: https://github.com/FossifyOrg/Contacts/issues/30
[#78]: https://github.com/FossifyOrg/Contacts/issues/78
[#157]: https://github.com/FossifyOrg/Contacts/issues/157
[#195]: https://github.com/FossifyOrg/Contacts/issues/195
[#201]: https://github.com/FossifyOrg/Contacts/issues/201
[#281]: https://github.com/FossifyOrg/Contacts/issues/281
[#289]: https://github.com/FossifyOrg/Contacts/issues/289
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ class VcfImporter(val activity: SimpleActivity) {
val ezContacts = Ezvcard.parse(inputStream).all()
for (ezContact in ezContacts) {
val structuredName = ezContact.structuredName
val prefix = structuredName?.prefixes?.firstOrNull() ?: ""
val firstName = structuredName?.given ?: ""
val middleName = structuredName?.additionalNames?.firstOrNull() ?: ""
val surname = structuredName?.family ?: ""
val suffix = structuredName?.suffixes?.firstOrNull() ?: ""
val nickname = ezContact.nickname?.values?.firstOrNull() ?: ""
val prefix = structuredName?.prefixes?.firstOrNull()?.trim() ?: ""
val firstName = structuredName?.given?.trim() ?: ""
val middleName = structuredName?.additionalNames?.firstOrNull()?.trim() ?: ""
val surname = structuredName?.family?.trim() ?: ""
val suffix = structuredName?.suffixes?.firstOrNull()?.trim() ?: ""
val nickname = ezContact.nickname?.values?.firstOrNull()?.trim() ?: ""
var photoUri = ""

val phoneNumbers = ArrayList<PhoneNumber>()
Expand Down
Loading