Used normalizeString from Commons

This commit is contained in:
Agnieszka C 2021-09-09 22:41:23 +02:00
parent e4c47780e4
commit 30e7b68c06
1 changed files with 1 additions and 7 deletions

View File

@ -767,13 +767,7 @@ fun Context.getLockScreenVisibilityText(type: Int) = getString(
)
fun Context.removeDiacriticsIfNeeded(text: String): String {
var msg = text
if (config.useSimpleCharacters) {
msg = Normalizer.normalize(msg, Normalizer.Form.NFD)
msg = msg.replace("\\p{InCombiningDiacriticalMarks}+".toRegex(), "")
}
return msg
return if (config.useSimpleCharacters) text.normalizeString() else text
}
fun Context.getSmsDraft(threadId: Long): String? {