Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
  • Loading branch information
ArnyminerZ committed Jul 5, 2024
1 parent 7e1675a commit b0526d5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/src/main/java/at/bitfire/vcard4android/ContactWriter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,11 @@ class ContactWriter private constructor(val contact: Contact, val version: VCard
if (relation.types.isEmpty())
name.addParameter("TYPE", "other")
else
label = relation.types.joinToString(", ") { type -> type.value.uppercase() }
label = relation.types.joinToString(", ") { type ->
type.value.replaceFirstChar {
if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString()
}
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ class RelationBuilder(dataRowUri: Uri, rawContactId: Long?, contact: Contact, re
if (related.types.isEmpty())
related.types += CustomType.Related.OTHER

val types = related.types.map { type -> type.value.uppercase() }
val types = related.types.map { type ->
type.value.replaceFirstChar {
if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString()
}
}
val typesStr = types.joinToString(", ")
builder.withValue(Relation.LABEL, typesStr)
}
Expand Down

0 comments on commit b0526d5

Please sign in to comment.