fix(@desktop/profile): decline all request when big pending request list
This commit is contained in:
parent
76f1aec0e3
commit
aa5f861cb8
|
@ -62,9 +62,10 @@ ModalPopup {
|
||||||
title: qsTr("Decline all contacts")
|
title: qsTr("Decline all contacts")
|
||||||
confirmationText: qsTr("Are you sure you want to decline all these contact requests")
|
confirmationText: qsTr("Are you sure you want to decline all these contact requests")
|
||||||
onConfirmButtonClicked: {
|
onConfirmButtonClicked: {
|
||||||
|
const requests = profileModel.contacts.contactRequests
|
||||||
const pubkeys = []
|
const pubkeys = []
|
||||||
for (let i = 0; i < contactList.count; i++) {
|
for (let i = 0; i < requests.count; i++) {
|
||||||
pubkeys.push(contactList.itemAtIndex(i).address)
|
pubkeys.push(requests.rowData(i, "address"))
|
||||||
}
|
}
|
||||||
profileModel.contacts.rejectContactRequests(JSON.stringify(pubkeys))
|
profileModel.contacts.rejectContactRequests(JSON.stringify(pubkeys))
|
||||||
declineAllDialog.close()
|
declineAllDialog.close()
|
||||||
|
@ -76,9 +77,10 @@ ModalPopup {
|
||||||
title: qsTr("Accept all contacts")
|
title: qsTr("Accept all contacts")
|
||||||
confirmationText: qsTr("Are you sure you want to accept all these contact requests")
|
confirmationText: qsTr("Are you sure you want to accept all these contact requests")
|
||||||
onConfirmButtonClicked: {
|
onConfirmButtonClicked: {
|
||||||
|
const requests = profileModel.contacts.contactRequests
|
||||||
const pubkeys = []
|
const pubkeys = []
|
||||||
for (let i = 0; i < contactList.count; i++) {
|
for (let i = 0; i < requests.count; i++) {
|
||||||
pubkeys.push(contactList.itemAtIndex(i).address)
|
pubkeys.push(requests.rowData(i, "address"))
|
||||||
}
|
}
|
||||||
profileModel.contacts.acceptContactRequests(JSON.stringify(pubkeys))
|
profileModel.contacts.acceptContactRequests(JSON.stringify(pubkeys))
|
||||||
acceptAllDialog.close()
|
acceptAllDialog.close()
|
||||||
|
|
Loading…
Reference in New Issue