diff options
author | link2xt <link2xt@testrun.org> | 2021-03-16 03:30:00 +0300 |
---|---|---|
committer | link2xt <link2xt@testrun.org> | 2021-03-16 03:30:00 +0300 |
commit | 9cc440eb5bf56b16ef6ea4bf2061f57d0c4b4e4a (patch) | |
tree | 43f02f06cd0e9ea1107a3df22535568008614755 | |
parent | 97f382bee8101a3815939839934d1a898e8aa507 (diff) | |
download | kdeltachat-9cc440eb5bf56b16ef6ea4bf2061f57d0c4b4e4a.tar.gz kdeltachat-9cc440eb5bf56b16ef6ea4bf2061f57d0c4b4e4a.zip |
Pass context and eventEmitter to ChatPage as properties
-rw-r--r-- | qml/ChatPage.qml | 3 | ||||
-rw-r--r-- | qml/ChatlistPage.qml | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/qml/ChatPage.qml b/qml/ChatPage.qml index fd6c154..1862b44 100644 --- a/qml/ChatPage.qml +++ b/qml/ChatPage.qml @@ -11,6 +11,9 @@ Kirigami.ScrollablePage { title: chat ? chat.name : qsTr("Chat") + required property DcContext context + required property DcAccountsEventEmitter eventEmitter + required property var chatId readonly property DcChat chat: context.getChat(chatId) diff --git a/qml/ChatlistPage.qml b/qml/ChatlistPage.qml index d095025..dfc41f0 100644 --- a/qml/ChatlistPage.qml +++ b/qml/ChatlistPage.qml @@ -111,7 +111,7 @@ Kirigami.ScrollablePage { console.log("Depth is " + pageStack.depth) let chatPageComponent = Qt.createComponent("qrc:/qml/ChatPage.qml") if (chatPageComponent.status == Component.Ready) { - let myPage = chatPageComponent.createObject(chatlistPage, {chatId: chatId}) + let myPage = chatPageComponent.createObject(chatlistPage, {chatId: chatId, context: chatlistPage.context, eventEmitter: chatlistPage.eventEmitter}) if (pageStack.depth == 1) { pageStack.push(myPage) } else if (pageStack.depth == 2) { |