fix(StatusTagSelector): Fix displaying a list of contacts in StatusTagSelector

Fix #5465
This commit is contained in:
Michal Iskierko 2022-04-12 17:06:22 +02:00 committed by r4bbit.eth
parent 29dd4da2e4
commit 2069399979
1 changed files with 6 additions and 5 deletions

View File

@ -60,8 +60,9 @@ Item {
id: root id: root
implicitWidth: 448 implicitWidth: 448
implicitHeight: 44 + ((userListView.count > 0) ? 44 + contactsLabel.height + contactsLabel.anchors.topMargin + ((((userListView.count * 64) > root.maxHeight) implicitHeight: 44 + ((userListView.model.count > 0) ? 44 + contactsLabel.height + contactsLabel.anchors.topMargin +
? root.maxHeight : (userListView.count * 64))) :0) ((((userListView.model.count * 64) > root.maxHeight) ? root.maxHeight : (userListView.model.count * 64))) :0)
/*! /*!
\qmlproperty real StatusTagSelector::maxHeight \qmlproperty real StatusTagSelector::maxHeight
This property holds the maximum height of the component. This property holds the maximum height of the component.
@ -139,9 +140,9 @@ Item {
for (var i = 0; i < inputModel.count; i++ ) { for (var i = 0; i < inputModel.count; i++ ) {
var entry = inputModel.get(i); var entry = inputModel.get(i);
if (entry.name.toLowerCase().includes(text.toLowerCase())) { if (entry.name.toLowerCase().includes(text.toLowerCase())) {
sortedList.insert(sortedList.count, {"publicId": entry.publicId, "name": entry.name, sortedList.append({"publicId": entry.publicId, "name": entry.name,
"icon": entry.icon, "isIdenticon": entry.isIdenticon, "icon": entry.icon, "isIdenticon": entry.isIdenticon,
"onlineStatus": entry.onlineStatus}); "onlineStatus": entry.onlineStatus});
userListView.model = sortedList; userListView.model = sortedList;
} }
} }