2023-05-19 16:07:50 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
|
2024-05-22 08:13:39 +00:00
|
|
|
import AppLayouts.Chat.stores 1.0
|
|
|
|
|
2023-05-19 16:07:50 +00:00
|
|
|
ConfirmationDialog {
|
|
|
|
id: root
|
|
|
|
|
2024-05-22 08:13:39 +00:00
|
|
|
property MessageStore messageStore
|
2023-05-19 16:07:50 +00:00
|
|
|
property string messageId
|
|
|
|
|
2023-05-23 12:46:16 +00:00
|
|
|
headerSettings.title: qsTr("Confirm deleting this message")
|
2023-05-19 16:07:50 +00:00
|
|
|
confirmationText: qsTr("Are you sure you want to delete this message? Be aware that other clients are not guaranteed to delete the message as well.")
|
|
|
|
height: 260
|
|
|
|
checkbox.visible: true
|
|
|
|
confirmButtonObjectName: "chatButtonsPanelConfirmDeleteMessageButton"
|
|
|
|
|
|
|
|
executeConfirm: () => {
|
|
|
|
if (checkbox.checked) {
|
|
|
|
localAccountSensitiveSettings.showDeleteMessageWarning = false
|
|
|
|
}
|
|
|
|
close()
|
|
|
|
messageStore.deleteMessage(messageId)
|
|
|
|
}
|
|
|
|
|
|
|
|
onClosed: {
|
|
|
|
destroy()
|
|
|
|
}
|
|
|
|
}
|