attempt to fix irreproducable bug with board context loading - AI assisted
This commit is contained in:
Vendored
+3
-2
@@ -3491,15 +3491,16 @@
|
|||||||
this.openLastUsedBoard();
|
this.openLastUsedBoard();
|
||||||
};
|
};
|
||||||
this.chatViewModel = chatViewModel;
|
this.chatViewModel = chatViewModel;
|
||||||
|
this.chatViewModel.registerContext("tasks" /* Tasks */, this);
|
||||||
|
this.selectedBoardId.subscribeSilent(this.updateContexts);
|
||||||
this.loadData();
|
this.loadData();
|
||||||
boardsAndTasksModel.boardHandlerManager.addHandler(
|
boardsAndTasksModel.boardHandlerManager.addHandler(
|
||||||
(boardInfoFileContent) => {
|
(boardInfoFileContent) => {
|
||||||
this.showBoardInList(boardInfoFileContent);
|
this.showBoardInList(boardInfoFileContent);
|
||||||
this.updateBoardIndices();
|
this.updateBoardIndices();
|
||||||
|
this.updateContexts();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
this.chatViewModel.registerContext("tasks" /* Tasks */, this);
|
|
||||||
this.selectedBoardId.subscribeSilent(this.updateContexts);
|
|
||||||
this.registerKeyStroke("." /* Options */, this.toggleBoardList);
|
this.registerKeyStroke("." /* Options */, this.toggleBoardList);
|
||||||
}
|
}
|
||||||
// context
|
// context
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export default class TaskPageViewModel extends ContextHost<string> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
get contextSelection(): string {
|
get contextSelection(): string | undefined {
|
||||||
return this.selectedBoardId.value;
|
return this.selectedBoardId.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,6 +170,10 @@ export default class TaskPageViewModel extends ContextHost<string> {
|
|||||||
|
|
||||||
this.chatViewModel = chatViewModel;
|
this.chatViewModel = chatViewModel;
|
||||||
|
|
||||||
|
// context
|
||||||
|
this.chatViewModel.registerContext(ChatPageTypes.Tasks, this);
|
||||||
|
this.selectedBoardId.subscribeSilent(this.updateContexts);
|
||||||
|
|
||||||
this.loadData();
|
this.loadData();
|
||||||
|
|
||||||
// handlers
|
// handlers
|
||||||
@@ -177,13 +181,10 @@ export default class TaskPageViewModel extends ContextHost<string> {
|
|||||||
(boardInfoFileContent: BoardInfoFileContent) => {
|
(boardInfoFileContent: BoardInfoFileContent) => {
|
||||||
this.showBoardInList(boardInfoFileContent);
|
this.showBoardInList(boardInfoFileContent);
|
||||||
this.updateBoardIndices();
|
this.updateBoardIndices();
|
||||||
|
this.updateContexts();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
// context
|
|
||||||
this.chatViewModel.registerContext(ChatPageTypes.Tasks, this);
|
|
||||||
this.selectedBoardId.subscribeSilent(this.updateContexts);
|
|
||||||
|
|
||||||
// keystrokes
|
// keystrokes
|
||||||
this.registerKeyStroke(CommonKeys.Options, this.toggleBoardList);
|
this.registerKeyStroke(CommonKeys.Options, this.toggleBoardList);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user