implement view persistence class to prevent junk subscriptions
This commit is contained in:
@@ -100,8 +100,7 @@ export class Context {
|
||||
this.keystrokes.set(key, fn);
|
||||
};
|
||||
|
||||
constructor(public contextDebugDescription: string) {
|
||||
}
|
||||
constructor(public contextDebugDescription: string) {}
|
||||
}
|
||||
|
||||
export class ContextHost<T> extends Context {
|
||||
|
||||
@@ -204,7 +204,7 @@ export default class BoardViewModel extends TaskContainingPageViewModel {
|
||||
this.boardInfo.fileId,
|
||||
);
|
||||
for (const taskId of taskIds) {
|
||||
if (this.taskViewModels.value.has(taskId)) return;
|
||||
if (this.taskViewModels.value.has(taskId)) continue;
|
||||
|
||||
const taskFileContent: TaskFileContent | null =
|
||||
this.boardsAndTasksModel.getLatestTaskFileContent(taskId);
|
||||
|
||||
@@ -143,7 +143,6 @@ export default class TaskPageViewModel extends ContextHost<string> {
|
||||
|
||||
// load
|
||||
loadData = (): void => {
|
||||
console.log("LOADING TASK PAGE DATA");
|
||||
this.closeContext();
|
||||
this.boardViewModels.clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user