fix bug where tasks were not sorted upon edit
This commit is contained in:
Vendored
+3
-3
@@ -1744,8 +1744,8 @@
|
||||
};
|
||||
this.updateTaskIndices = () => {
|
||||
this.taskIndexManager.update([...this.taskViewModels.value.values()]);
|
||||
for (const boardViewModel of this.taskViewModels.value.values()) {
|
||||
boardViewModel.updateIndex();
|
||||
for (const taskViewModel of this.taskViewModels.value.values()) {
|
||||
taskViewModel.updateIndex();
|
||||
}
|
||||
};
|
||||
this.boardsAndTasksModel = boardsAndTasksModel;
|
||||
@@ -1830,6 +1830,7 @@
|
||||
this.taskViewModels.remove(taskFileContent.fileId);
|
||||
this.taskViewModels.set(taskFileContent.fileId, taskViewModel);
|
||||
mapState?.set(taskFileContent.fileId, taskViewModel);
|
||||
this.updateTaskIndices();
|
||||
};
|
||||
this.removeTaskFromView = (taskFileContent) => {
|
||||
this.taskViewModels.remove(taskFileContent.fileId);
|
||||
@@ -1879,7 +1880,6 @@
|
||||
if (taskFileContent == null) continue;
|
||||
this.showTask(taskFileContent);
|
||||
}
|
||||
this.updateTaskIndices();
|
||||
};
|
||||
this.loadData = () => {
|
||||
this.loadMonthTasks();
|
||||
|
||||
@@ -117,6 +117,7 @@ export default class CalendarPageViewModel extends TaskContainingPageViewModel {
|
||||
this.taskViewModels.set(taskFileContent.fileId, taskViewModel);
|
||||
|
||||
mapState?.set(taskFileContent.fileId, taskViewModel);
|
||||
this.updateTaskIndices();
|
||||
};
|
||||
|
||||
removeTaskFromView = (taskFileContent: TaskFileContent): void => {
|
||||
@@ -178,8 +179,6 @@ export default class CalendarPageViewModel extends TaskContainingPageViewModel {
|
||||
if (taskFileContent == null) continue;
|
||||
this.showTask(taskFileContent);
|
||||
}
|
||||
|
||||
this.updateTaskIndices();
|
||||
};
|
||||
|
||||
loadData = (): void => {
|
||||
|
||||
@@ -51,8 +51,8 @@ export default class TaskContainingPageViewModel {
|
||||
|
||||
updateTaskIndices = (): void => {
|
||||
this.taskIndexManager.update([...this.taskViewModels.value.values()]);
|
||||
for (const boardViewModel of this.taskViewModels.value.values()) {
|
||||
boardViewModel.updateIndex();
|
||||
for (const taskViewModel of this.taskViewModels.value.values()) {
|
||||
taskViewModel.updateIndex();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user