show confirmation dialog when leaving chat
This commit is contained in:
parent
38be2889cd
commit
efd1677b24
|
@ -134,8 +134,22 @@ PopupMenu {
|
|||
icon.width: 16
|
||||
icon.height: 16
|
||||
icon.color: Style.current.red
|
||||
onTriggered: chatsModel.leaveChatByIndex(channelContextMenu.channelIndex)
|
||||
onTriggered: openPopup(deleteChatConfirmationDialogComponent)
|
||||
enabled: !chatsModel.communities.activeCommunity.active
|
||||
}
|
||||
|
||||
Component {
|
||||
id: deleteChatConfirmationDialogComponent
|
||||
ConfirmationDialog {
|
||||
btnType: "warn"
|
||||
onClosed: {
|
||||
destroy()
|
||||
}
|
||||
onConfirmButtonClicked: {
|
||||
chatsModel.leaveChatByIndex(channelContextMenu.channelIndex)
|
||||
close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue