Commit aa38cde2 authored by Dimitris Kardarakos's avatar Dimitris Kardarakos

Unify refresh mechanism when tasks are either added or deleted

parent 8a8f3b29
......@@ -182,7 +182,7 @@ Kirigami.ApplicationWindow {
calendar: localCalendar
onEditTask: root.pageStack.push(todoPage, { startdt: modelData.dtstart, uid: modelData.uid, todoData: modelData })
onTaskDeleted: root.refreshNeeded()
onTasksUpdated: root.refreshNeeded()
}
Component {
......
......@@ -30,8 +30,8 @@ Kirigami.Page {
property var calendar
signal editTask(var modelData)
signal taskDeleted
signal tasksUpdated
function reload()
{
cardsListview.model.reloadTasks();
......@@ -51,7 +51,7 @@ Kirigami.Page {
calendar: localCalendar
onTaskeditcompleted: {
root.refreshNeeded();
tasksUpdated();
pageStack.pop(todoPage);
}
}
......@@ -77,7 +77,7 @@ Kirigami.Page {
onTriggered: {
root.calendar.deleteTask(model.uid);
taskDeleted();
tasksUpdated();
}
},
......
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