summaryrefslogtreecommitdiff
path: root/kodereviewer/qml/Main.qml
diff options
context:
space:
mode:
Diffstat (limited to 'kodereviewer/qml/Main.qml')
-rw-r--r--kodereviewer/qml/Main.qml27
1 files changed, 26 insertions, 1 deletions
diff --git a/kodereviewer/qml/Main.qml b/kodereviewer/qml/Main.qml
index 56248d7..1c5e951 100644
--- a/kodereviewer/qml/Main.qml
+++ b/kodereviewer/qml/Main.qml
@@ -46,6 +46,29 @@ Kirigami.ApplicationWindow {
}
}
+
+
+ Loader {
+ id: treeFileModelLoader
+ active: !!pullRequest
+ property var pullRequest: undefined
+
+ sourceComponent: TreeFileModel {
+ pullRequest: treeFileModelLoader.pullRequest
+ }
+ }
+
+ contextDrawer: FilesDrawer {
+ id: contextDrawer
+ enabled: treeFileModelLoader.active
+ model: treeFileModelLoader.item
+
+ onEnabledChanged: {
+ print("Enabled? " + enabled)
+ }
+ }
+
+
Loader {
id: projectListPageLoader
active: false
@@ -55,7 +78,9 @@ Kirigami.ApplicationWindow {
project: root.project
onPullRequestSelected: number => {
- pullRequestPageLoader.item.pullRequest = project.pullRequest(number)
+ const pullRequest = project.pullRequest(number)
+ pullRequestPageLoader.item.pullRequest = pullRequest
+ treeFileModelLoader.pullRequest = pullRequest
}
}
}