update local BoardModel after saving task

This commit is contained in:
marlon-erler
2024-07-24 13:45:24 +02:00
parent b1f28cd5ad
commit b012d80fef
3 changed files with 2 additions and 9 deletions
+1 -4
View File
@@ -1477,7 +1477,7 @@
newTaskFileContent.date = this.date.value;
newTaskFileContent.time = this.time.value;
this.boardModel.updateTaskAndSend(newTaskFileContent);
this.boardViewModel.trackTask(this);
this.boardViewModel.showTaskInList(newTaskFileContent);
};
// load
loadAllData = () => {
@@ -1552,9 +1552,6 @@
);
this.selectTask(taskViewModel);
};
trackTask = (taskViewModel) => {
this.taskViewModels.set(taskViewModel.task.fileId, taskViewModel);
};
// storage
storeLastUsedView = () => {
const path = this.getLastUsedBoardPath();
-4
View File
@@ -79,10 +79,6 @@ export default class BoardViewModel {
this.selectTask(taskViewModel);
};
trackTask = (taskViewModel: TaskViewModel): void => {
this.taskViewModels.set(taskViewModel.task.fileId, taskViewModel);
};
// storage
storeLastUsedView = (): void => {
const path: string[] = this.getLastUsedBoardPath();
+1 -1
View File
@@ -60,7 +60,7 @@ export default class TaskViewModel {
newTaskFileContent.time = this.time.value;
this.boardModel.updateTaskAndSend(newTaskFileContent);
this.boardViewModel.trackTask(this);
this.boardViewModel.showTaskInList(newTaskFileContent);
};
// load