mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-12 22:56:55 +00:00
This corrects the call to action button in the modal footer as well as the "no friends" rectangle, which was wrongly rendered.
49 lines
1.4 KiB
QML
49 lines
1.4 KiB
QML
import QtQuick 2.13
|
|
import QtQuick.Controls 2.3
|
|
|
|
import utils 1.0
|
|
|
|
import "../controls"
|
|
|
|
ScrollView {
|
|
property alias membersData: membersData
|
|
property string searchString
|
|
property bool selectMode: true
|
|
property var onItemChecked
|
|
anchors.fill: parent
|
|
|
|
id: root
|
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
|
ScrollBar.vertical.policy: groupMembers.contentHeight > groupMembers.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
|
|
|
|
ListView {
|
|
anchors.fill: parent
|
|
model: ListModel {
|
|
id: membersData
|
|
}
|
|
spacing: 0
|
|
clip: true
|
|
id: groupMembers
|
|
delegate: Contact {
|
|
isVisible: {
|
|
if (selectMode) {
|
|
return !searchString || model.name.toLowerCase().includes(searchString)
|
|
}
|
|
|
|
return isChecked || isUser
|
|
}
|
|
showCheckbox: root.selectMode
|
|
pubKey: model.pubKey
|
|
isContact: !!model.isContact
|
|
isUser: model.isUser
|
|
name: !model.name.endsWith(".eth") && !!model.localNickname ?
|
|
model.localNickname : Utils.removeStatusEns(model.name)
|
|
address: model.address
|
|
identicon: model.thumbnailImage || model.identicon
|
|
onItemChecked: function (pubKey, itemChecked) {
|
|
root.onItemChecked(pubKey, itemChecked)
|
|
}
|
|
}
|
|
}
|
|
}
|