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
|
||||
}
|
||||
onClicked: {
|
||||
dialog.close();
|
||||
deviceVerificationList.remove(tran_id);
|
||||
delete flow;
|
||||
flow.deleteFlow();
|
||||
dialog.destroy();
|
||||
}
|
||||
}
|
||||
Item {
|
||||
|
@ -141,9 +141,9 @@ ApplicationWindow {
|
|||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
onClicked: {
|
||||
dialog.close();
|
||||
flow.cancelVerification(DeviceVerificationFlow.User);
|
||||
deviceVerificationList.remove(tran_id);
|
||||
dialog.destroy();
|
||||
}
|
||||
}
|
||||
Item {
|
||||
|
@ -205,9 +205,9 @@ ApplicationWindow {
|
|||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
onClicked: {
|
||||
dialog.close();
|
||||
flow.cancelVerification(DeviceVerificationFlow.User);
|
||||
deviceVerificationList.remove(tran_id);
|
||||
dialog.destroy();
|
||||
}
|
||||
}
|
||||
Item {
|
||||
|
@ -267,9 +267,9 @@ ApplicationWindow {
|
|||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
onClicked: {
|
||||
dialog.close();
|
||||
flow.cancelVerification(DeviceVerificationFlow.MismatchedSAS);
|
||||
deviceVerificationList.remove(tran_id);
|
||||
dialog.destroy();
|
||||
}
|
||||
}
|
||||
Item {
|
||||
|
@ -426,9 +426,9 @@ ApplicationWindow {
|
|||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
onClicked: {
|
||||
dialog.close();
|
||||
flow.cancelVerification(DeviceVerificationFlow.MismatchedSAS);
|
||||
deviceVerificationList.remove(tran_id);
|
||||
dialog.destroy();
|
||||
}
|
||||
}
|
||||
Item {
|
||||
|
@ -487,9 +487,9 @@ ApplicationWindow {
|
|||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
onClicked: {
|
||||
dialog.close();
|
||||
flow.cancelVerification(DeviceVerificationFlow.User);
|
||||
deviceVerificationList.remove(tran_id);
|
||||
dialog.destroy();
|
||||
}
|
||||
}
|
||||
Item {
|
||||
|
@ -534,9 +534,9 @@ ApplicationWindow {
|
|||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
onClicked: {
|
||||
dialog.close()
|
||||
deviceVerificationList.remove(tran_id);
|
||||
delete flow;
|
||||
flow.deleteFlow();
|
||||
dialog.destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -578,8 +578,8 @@ ApplicationWindow {
|
|||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
onClicked: {
|
||||
dialog.close();
|
||||
deviceVerificationList.remove(tran_id);
|
||||
dialog.destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -622,9 +622,9 @@ ApplicationWindow {
|
|||
}
|
||||
text: qsTr("Close")
|
||||
onClicked: {
|
||||
dialog.close()
|
||||
deviceVerificationList.remove(tran_id);
|
||||
delete flow;
|
||||
flow.deleteFlow();
|
||||
dialog.destroy()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,6 +41,10 @@ DeviceVerificationFlow::DeviceVerificationFlow(QObject *,
|
|||
this->deleteLater();
|
||||
});
|
||||
|
||||
connect(this,&DeviceVerificationFlow::deleteFlow,this,[this](){
|
||||
this->deleteLater();
|
||||
});
|
||||
|
||||
connect(
|
||||
ChatPage::instance(),
|
||||
&ChatPage::recievedDeviceVerificationStart,
|
||||
|
|
|
@ -105,6 +105,7 @@ signals:
|
|||
void timedout();
|
||||
void verificationCanceled();
|
||||
void refreshProfile();
|
||||
void deleteFlow();
|
||||
|
||||
private:
|
||||
// general
|
||||
|
|
Loading…
Reference in a new issue