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

View File

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