diff options
author | link2xt <link2xt@testrun.org> | 2021-07-26 00:07:19 +0300 |
---|---|---|
committer | link2xt <link2xt@testrun.org> | 2021-07-26 00:08:11 +0300 |
commit | cd6fe80f84c1f1e44b4ee306ac2672a7287778c1 (patch) | |
tree | 150ab9e3b2f4a2228be0387fab5d7f40af363d2b /qml/ChatPage.qml | |
parent | 9e5fe2dc856795d0d3d8b6a3adf3fdd3015d9158 (diff) | |
download | kdeltachat-cd6fe80f84c1f1e44b4ee306ac2672a7287778c1.tar.gz kdeltachat-cd6fe80f84c1f1e44b4ee306ac2672a7287778c1.zip |
Get rid of the contact requests chat
Diffstat (limited to 'qml/ChatPage.qml')
-rw-r--r-- | qml/ChatPage.qml | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/qml/ChatPage.qml b/qml/ChatPage.qml index 3099488..9b2e7c6 100644 --- a/qml/ChatPage.qml +++ b/qml/ChatPage.qml @@ -15,7 +15,20 @@ Kirigami.ScrollablePage { required property DcAccountsEventEmitter eventEmitter required property var chatId - readonly property DcChat chat: context.getChat(chatId) + property DcChat chat: context.getChat(chatId) + + contextualActions: [ + Kirigami.Action { + text: "Accept contact request" + onTriggered: chatPage.context.unblockChat(chatPage.chatId) + visible: chatPage.chat && chatPage.chat.isContactRequest + }, + Kirigami.Action { + text: "Block contact request" + onTriggered: chatPage.context.blockChat(chatPage.chatId) + visible: chatPage.chat && chatPage.chat.isContactRequest + } + ] function updateMessagelist() { // Reverse message list, because it is laid out from bottom to top. @@ -57,6 +70,7 @@ Kirigami.ScrollablePage { function onChatModified() { console.log("CHAT MODIFIED!") + chatPage.chat = context.getChat(chatId) } function onIncomingMessage(accountId, chatId, msgId) { console.log("Incoming message for chat " + chatId) |