Commit 8d08d3c5 authored by Dimitris Kardarakos's avatar Dimitris Kardarakos

Make TodosView a component

parent 4b25ad7f
Pipeline #2824 passed with stage
in 15 minutes and 57 seconds
......@@ -32,8 +32,6 @@ Kirigami.ApplicationWindow {
*/
signal refreshNeeded;
onRefreshNeeded: todosView.reload()
globalDrawer: Kirigami.GlobalDrawer {
id: drawer
......@@ -202,13 +200,22 @@ Kirigami.ApplicationWindow {
}
}
TodosView {
Component {
id: todosView
calendar: localCalendar
TodosView {
calendar: localCalendar
onEditTask: root.pageStack.push(todoPage, { startdt: modelData.dtstart, uid: modelData.uid, todoData: modelData })
onTasksUpdated: root.refreshNeeded()
onEditTask: root.pageStack.push(todoPage, { startdt: modelData.dtstart, uid: modelData.uid, todoData: modelData })
onTasksUpdated: root.refreshNeeded()
Connections {
target: root
onRefreshNeeded: reload()
}
}
}
Component {
......@@ -216,7 +223,6 @@ Kirigami.ApplicationWindow {
TodoPage {
calendar: localCalendar
onTaskeditcompleted: {
root.refreshNeeded();
root.pageStack.pop(todoPage);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment