mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-21 05:38:12 +00:00
Display non-Ascii avatar
This commit is contained in:
parent
f2ec5fda4e
commit
8bf294eb3d
2 changed files with 12 additions and 6 deletions
|
|
@ -11,7 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- File viewer in chats (Image/Animated Image/Video/Texts) with the option to export the file.
|
||||
- Accept/decline CLI commands.
|
||||
|
||||
## 5.0.10 - undefined
|
||||
## 5.0.11 - udnefined
|
||||
|
||||
### Fixed
|
||||
- Display of non-Ascii avatar
|
||||
|
||||
## 5.0.10 - 2023-02-02
|
||||
|
||||
### Fixed
|
||||
- Remove blank notification when declining incoming call.
|
||||
|
|
|
|||
|
|
@ -33,14 +33,15 @@ Item {
|
|||
}
|
||||
|
||||
function _computeInitials () {
|
||||
// Do not use charAt from string because it doesn't support all UTF8 characters.
|
||||
var result = username.match(_initialsRegex)
|
||||
if (!result) {
|
||||
return username.length > 0 ? username.charAt(0).toUpperCase() : ''
|
||||
var usernameArray = Array.from(username)
|
||||
return usernameArray.length > 0 ? usernameArray[0].toUpperCase() : ''
|
||||
}
|
||||
|
||||
return result[1].charAt(0).toUpperCase() + (
|
||||
result[2] != null
|
||||
? result[2].charAt(0).toUpperCase()
|
||||
return Array.from(result[1])[0].toUpperCase() + (
|
||||
result.length > 1 && result[2].length > 0
|
||||
? Array.from(result[2])[0].toUpperCase()
|
||||
: ''
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue