mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-31 19:50:44 +00:00
fix issue when task order is not saved
This commit is contained in:
parent
7963f57b5e
commit
7eb8e501b6
1 changed files with 10 additions and 3 deletions
|
|
@ -30,9 +30,13 @@
|
|||
|
||||
vm.r = $rootScope.r;
|
||||
|
||||
//vm.tasks = $rootScope.r.tasks;
|
||||
//vm.backlogTasks = $rootScope.r.backlogTasks;
|
||||
//vm.currentTask = $rootScope.r.currentTask;
|
||||
function mergeDoneAndUndone() {
|
||||
// we need to re-merge because of splitting up the tasks into two
|
||||
if (vm.tasksUndone && vm.tasksDone) {
|
||||
let newTaskList = vm.tasksDone.concat(vm.tasksUndone);
|
||||
Tasks.updateToday(newTaskList);
|
||||
}
|
||||
}
|
||||
|
||||
vm.openAddTask = () => {
|
||||
Dialogs('ADD_TASK');
|
||||
|
|
@ -54,6 +58,9 @@
|
|||
}
|
||||
};
|
||||
|
||||
$scope.$watch('vm.tasksDone', mergeDoneAndUndone, true);
|
||||
$scope.$watch('vm.tasksUndone', mergeDoneAndUndone, true);
|
||||
|
||||
$scope.$watch('vm.r.tasks', () => {
|
||||
vm.tasksUndone = Tasks.getUndoneToday();
|
||||
vm.tasksDone = Tasks.getDoneToday();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue