Added escape handler for uploads (#1100)

* Added escape handler for uploads

* Update MessageView.qml

Changed if-else conditions to handle only one escape at a time
This commit is contained in:
Rohit Sutradhar 2022-06-18 01:38:29 +05:30 committed by GitHub
parent 8cdfbf9391
commit b0e3c6d65a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -192,10 +192,12 @@ Item {
Shortcut {
sequence: StandardKey.Cancel
onActivated: {
if (chat.model.reply)
chat.model.reply = undefined;
if(room.input.uploads.length > 0)
room.input.declineUploads();
else if(chat.model.reply)
chat.model.reply = undefined;
else
chat.model.edit = undefined;
chat.model.edit = undefined;
}
}