fix bug where tasks were not sorted upon edit
This commit is contained in:
@@ -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