mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
Making sure Verification Objects are deleted properly
This commit is contained in:
parent
e70b4e4268
commit
a27662dc08
3 changed files with 19 additions and 14 deletions
|
@ -82,9 +82,9 @@ ApplicationWindow {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
dialog.close();
|
|
||||||
deviceVerificationList.remove(tran_id);
|
deviceVerificationList.remove(tran_id);
|
||||||
delete flow;
|
flow.deleteFlow();
|
||||||
|
dialog.destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
|
@ -141,9 +141,9 @@ ApplicationWindow {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
dialog.close();
|
|
||||||
flow.cancelVerification(DeviceVerificationFlow.User);
|
flow.cancelVerification(DeviceVerificationFlow.User);
|
||||||
deviceVerificationList.remove(tran_id);
|
deviceVerificationList.remove(tran_id);
|
||||||
|
dialog.destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
|
@ -205,9 +205,9 @@ ApplicationWindow {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
dialog.close();
|
|
||||||
flow.cancelVerification(DeviceVerificationFlow.User);
|
flow.cancelVerification(DeviceVerificationFlow.User);
|
||||||
deviceVerificationList.remove(tran_id);
|
deviceVerificationList.remove(tran_id);
|
||||||
|
dialog.destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
|
@ -266,10 +266,10 @@ ApplicationWindow {
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
dialog.close();
|
|
||||||
flow.cancelVerification(DeviceVerificationFlow.MismatchedSAS);
|
flow.cancelVerification(DeviceVerificationFlow.MismatchedSAS);
|
||||||
deviceVerificationList.remove(tran_id);
|
deviceVerificationList.remove(tran_id);
|
||||||
|
dialog.destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
|
@ -425,10 +425,10 @@ ApplicationWindow {
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
dialog.close();
|
|
||||||
flow.cancelVerification(DeviceVerificationFlow.MismatchedSAS);
|
flow.cancelVerification(DeviceVerificationFlow.MismatchedSAS);
|
||||||
deviceVerificationList.remove(tran_id);
|
deviceVerificationList.remove(tran_id);
|
||||||
|
dialog.destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
|
@ -487,9 +487,9 @@ ApplicationWindow {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
dialog.close();
|
|
||||||
flow.cancelVerification(DeviceVerificationFlow.User);
|
flow.cancelVerification(DeviceVerificationFlow.User);
|
||||||
deviceVerificationList.remove(tran_id);
|
deviceVerificationList.remove(tran_id);
|
||||||
|
dialog.destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
|
@ -534,9 +534,9 @@ ApplicationWindow {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
dialog.close()
|
|
||||||
deviceVerificationList.remove(tran_id);
|
deviceVerificationList.remove(tran_id);
|
||||||
delete flow;
|
flow.deleteFlow();
|
||||||
|
dialog.destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -578,8 +578,8 @@ ApplicationWindow {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
dialog.close();
|
|
||||||
deviceVerificationList.remove(tran_id);
|
deviceVerificationList.remove(tran_id);
|
||||||
|
dialog.destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -622,9 +622,9 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
text: qsTr("Close")
|
text: qsTr("Close")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
dialog.close()
|
|
||||||
deviceVerificationList.remove(tran_id);
|
deviceVerificationList.remove(tran_id);
|
||||||
delete flow;
|
flow.deleteFlow();
|
||||||
|
dialog.destroy()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,10 @@ DeviceVerificationFlow::DeviceVerificationFlow(QObject *,
|
||||||
this->deleteLater();
|
this->deleteLater();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
connect(this,&DeviceVerificationFlow::deleteFlow,this,[this](){
|
||||||
|
this->deleteLater();
|
||||||
|
});
|
||||||
|
|
||||||
connect(
|
connect(
|
||||||
ChatPage::instance(),
|
ChatPage::instance(),
|
||||||
&ChatPage::recievedDeviceVerificationStart,
|
&ChatPage::recievedDeviceVerificationStart,
|
||||||
|
|
|
@ -105,6 +105,7 @@ signals:
|
||||||
void timedout();
|
void timedout();
|
||||||
void verificationCanceled();
|
void verificationCanceled();
|
||||||
void refreshProfile();
|
void refreshProfile();
|
||||||
|
void deleteFlow();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// general
|
// general
|
||||||
|
|
Loading…
Reference in a new issue