diff --git a/CHANGELOG.md b/CHANGELOG.md index 92e293158..393b8e868 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed invisible navigation bars in contact viewer ([#415]) - Fixed search highlighting for characters with accents and diacritics ([#12]) +- Fixed wrong spacing in contact names ([#157]) ## [1.4.0] - 2025-10-29 ### Changed @@ -102,6 +103,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#12]: https://github.com/FossifyOrg/Contacts/issues/12 [#30]: https://github.com/FossifyOrg/Contacts/issues/30 [#78]: https://github.com/FossifyOrg/Contacts/issues/78 +[#157]: https://github.com/FossifyOrg/Contacts/issues/157 [#201]: https://github.com/FossifyOrg/Contacts/issues/201 [#281]: https://github.com/FossifyOrg/Contacts/issues/281 [#289]: https://github.com/FossifyOrg/Contacts/issues/289 diff --git a/app/src/main/kotlin/org/fossify/contacts/adapters/ContactsAdapter.kt b/app/src/main/kotlin/org/fossify/contacts/adapters/ContactsAdapter.kt index 0c936e0bf..743b177ef 100644 --- a/app/src/main/kotlin/org/fossify/contacts/adapters/ContactsAdapter.kt +++ b/app/src/main/kotlin/org/fossify/contacts/adapters/ContactsAdapter.kt @@ -389,7 +389,7 @@ class ContactsAdapter( view.apply { setupViewBackground(activity) findViewById(org.fossify.commons.R.id.item_contact_frame)?.isSelected = selectedKeys.contains(contact.id) - val fullName = contact.getNameToDisplay() + val fullName = contact.getNameToDisplay().replace(Regex("\\s+"), " ") findViewById(org.fossify.commons.R.id.item_contact_name).text = if (textToHighlight.isEmpty()) fullName else { val normalizedFullName = fullName.normalizeString() val normalizedSearchText = textToHighlight.normalizeString()