refactor(Communities): use StatusQ's StatusInput in memberlist popup

This commit is contained in:
Pascal Precht 2021-08-16 15:45:33 +02:00 committed by Pascal Precht
parent 2142609eb1
commit a81678f742
1 changed files with 7 additions and 15 deletions

View File

@ -29,17 +29,9 @@ Item {
id: memberSearchAndInviteButton id: memberSearchAndInviteButton
Item { StatusInput {
width: parent.width id: memberSearch
height: 76 input.placeholderText: qsTr("Member name")
Input {
id: memberSearch
width: parent.width - 32
anchors.centerIn: parent
//% "Member name"
placeholderText: qsTrId("member-name")
}
} }
StatusListItem { StatusListItem {
@ -107,7 +99,7 @@ Item {
Item { Item {
width: parent.width width: parent.width
height: 300 height: 300
visible: !!memberSearch.text && !!memberList.count && !memberListColumn.height visible: !!memberSearch.input.text && !!memberList.count && !memberListColumn.height
StatusBaseText { StatusBaseText {
anchors.centerIn: parent anchors.centerIn: parent
@ -134,9 +126,9 @@ Item {
property string nickname: appMain.getUserNickname(model.pubKey) property string nickname: appMain.getUserNickname(model.pubKey)
property string profileImage: appMain.getProfileImage(model.pubKey) property string profileImage: appMain.getProfileImage(model.pubKey)
visible: !!!memberSearch.text || visible: !!!memberSearch.input.text ||
model.userName.toLowerCase().includes(memberSearch.text.toLowerCase()) || model.userName.toLowerCase().includes(memberSearch.input.text.toLowerCase()) ||
nickname.toLowerCase().includes(memberSearch.text.toLowerCase()) nickname.toLowerCase().includes(memberSearch.input.text.toLowerCase())
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
image.isIdenticon: !profileImage image.isIdenticon: !profileImage