Reference chatPage correctly in new delete action

Co-authored-by: jgibbon <99138+jgibbon@users.noreply.github.com>
This commit is contained in:
Sebastian Wolf 2021-02-16 18:47:12 +01:00 committed by GitHub
parent 532b35e9f3
commit 01cdb18b46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -793,7 +793,7 @@ Page {
width: parent.width
visible: messageOptionsDrawer.myMessage.can_be_deleted_for_all_users || (messageOptionsDrawer.myMessage.can_be_deleted_only_for_self && messageOptionsDrawer.myMessage.chat_id === chatPage.myUserId)
onClicked: {
var chatId = page.chatInformation.id;
var chatId = chatPage.chatInformation.id;
var messageId = messageOptionsDrawer.myMessage.id;
Remorse.itemAction(messageOptionsDrawer.sourceItem, qsTr("Message deleted"), function() { tdLibWrapper.deleteMessages(chatId, [ messageId ]); });
messageOptionsDrawer.closeDrawer();