disable accept and decline all buttons on empty list and join on approve

This commit is contained in:
Jonathan Rainville 2021-05-26 16:04:42 -04:00
parent 7b95031ee6
commit 346cbd2433
2 changed files with 6 additions and 1 deletions

View File

@ -87,6 +87,7 @@ ModalPopup {
StatusButton { StatusButton {
id: blockBtn id: blockBtn
enabled: contactList.count > 0
anchors.right: addToContactsButton.left anchors.right: addToContactsButton.left
anchors.rightMargin: Style.current.padding anchors.rightMargin: Style.current.padding
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
@ -97,6 +98,7 @@ ModalPopup {
StatusButton { StatusButton {
id: addToContactsButton id: addToContactsButton
enabled: contactList.count > 0
anchors.right: parent.right anchors.right: parent.right
text: qsTr("Accept all") text: qsTr("Accept all")
anchors.bottom: parent.bottom anchors.bottom: parent.bottom

View File

@ -76,7 +76,10 @@ Rectangle {
StatusIconButton { StatusIconButton {
id: acceptBtn id: acceptBtn
icon.name: "check-circle" icon.name: "check-circle"
onClicked: profileModel.contacts.addContact(container.address) onClicked: {
chatsModel.joinPrivateChat(container.address, "")
profileModel.contacts.addContact(container.address)
}
width: 32 width: 32
height: 32 height: 32
padding: 6 padding: 6