Init UserListModel.

Another model from Quaternion.
Also UI tweaks in RoomListModel.
This commit is contained in:
Black Hat
2018-08-26 13:17:12 +08:00
parent 8c4ef9ad01
commit 0ad9ed7b5d
9 changed files with 287 additions and 50 deletions

View File

@@ -56,7 +56,9 @@ Item {
function getInitials(text) {
if (!text) return "N"
return text.toUpperCase().replace(/[^a-zA-Z- ]/g, "").match(/\b\w/g);
var initial = text.toUpperCase().replace(/[^a-zA-Z- ]/g, "").match(/\b\w/g);
if (!initial) return "N"
return initial
}
function stringToColor(str) {