fix loading of boards when calendar page is opened
This commit is contained in:
Vendored
+5
-5
@@ -3123,7 +3123,7 @@
|
|||||||
this.chatViewModel.chatListViewModel.untrackChat(this.chatViewModel);
|
this.chatViewModel.chatListViewModel.untrackChat(this.chatViewModel);
|
||||||
};
|
};
|
||||||
// load
|
// load
|
||||||
this.loadListRelevantData = () => {
|
this.preloadData = () => {
|
||||||
this.primaryChannel.value = this.chatViewModel.chatModel.info.primaryChannel;
|
this.primaryChannel.value = this.chatViewModel.chatModel.info.primaryChannel;
|
||||||
this.color.value = this.chatViewModel.chatModel.color;
|
this.color.value = this.chatViewModel.chatModel.color;
|
||||||
};
|
};
|
||||||
@@ -3138,7 +3138,7 @@
|
|||||||
this.secondaryChannels.add(secondaryChannel);
|
this.secondaryChannels.add(secondaryChannel);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.loadListRelevantData();
|
this.preloadData();
|
||||||
this.cannotSetEncryptionKey = createProxyState(
|
this.cannotSetEncryptionKey = createProxyState(
|
||||||
[this.encryptionKeyInput],
|
[this.encryptionKeyInput],
|
||||||
() => this.encryptionKeyInput.value == this.chatViewModel.chatModel.info.encryptionKey
|
() => this.encryptionKeyInput.value == this.chatViewModel.chatModel.info.encryptionKey
|
||||||
@@ -3296,7 +3296,7 @@
|
|||||||
this.index.value = index;
|
this.index.value = index;
|
||||||
};
|
};
|
||||||
// load
|
// load
|
||||||
this.loadListRelevantData = () => {
|
this.preloadData = () => {
|
||||||
this.name.value = this.boardInfo.name;
|
this.name.value = this.boardInfo.name;
|
||||||
this.color.value = this.boardInfo.color;
|
this.color.value = this.boardInfo.color;
|
||||||
};
|
};
|
||||||
@@ -3336,8 +3336,7 @@
|
|||||||
this.loadTasks();
|
this.loadTasks();
|
||||||
this.loadSearchSuggestions();
|
this.loadSearchSuggestions();
|
||||||
};
|
};
|
||||||
console.log("NEW BOARD VM");
|
this.preloadData();
|
||||||
this.loadListRelevantData();
|
|
||||||
this.isSelected = createProxyState(
|
this.isSelected = createProxyState(
|
||||||
[this.taskPageViewModel.selectedBoardId],
|
[this.taskPageViewModel.selectedBoardId],
|
||||||
() => this.taskPageViewModel.selectedBoardId.value == this.boardInfo.fileId
|
() => this.taskPageViewModel.selectedBoardId.value == this.boardInfo.fileId
|
||||||
@@ -3509,6 +3508,7 @@
|
|||||||
this.updateBoardIndices();
|
this.updateBoardIndices();
|
||||||
this.openLastUsedBoard();
|
this.openLastUsedBoard();
|
||||||
};
|
};
|
||||||
|
this.loadData();
|
||||||
this.chatViewModel = chatViewModel;
|
this.chatViewModel = chatViewModel;
|
||||||
this.chatViewModel.registerContext("tasks" /* Tasks */, this);
|
this.chatViewModel.registerContext("tasks" /* Tasks */, this);
|
||||||
this.selectedBoardId.subscribeSilent(this.updateContexts);
|
this.selectedBoardId.subscribeSilent(this.updateContexts);
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ export default class BoardViewModel extends TaskContainingPageViewModel {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// load
|
// load
|
||||||
loadListRelevantData = (): void => {
|
preloadData = (): void => {
|
||||||
this.name.value = this.boardInfo.name;
|
this.name.value = this.boardInfo.name;
|
||||||
this.color.value = this.boardInfo.color;
|
this.color.value = this.boardInfo.color;
|
||||||
};
|
};
|
||||||
@@ -255,10 +255,9 @@ export default class BoardViewModel extends TaskContainingPageViewModel {
|
|||||||
public readonly boardInfo: BoardInfoFileContent,
|
public readonly boardInfo: BoardInfoFileContent,
|
||||||
) {
|
) {
|
||||||
super(coreViewModel, chatViewModel, boardsAndTasksModel, "board");
|
super(coreViewModel, chatViewModel, boardsAndTasksModel, "board");
|
||||||
console.log("NEW BOARD VM")
|
|
||||||
|
|
||||||
// load
|
// load
|
||||||
this.loadListRelevantData();
|
this.preloadData();
|
||||||
|
|
||||||
// subscriptions
|
// subscriptions
|
||||||
this.isSelected = React.createProxyState(
|
this.isSelected = React.createProxyState(
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ export default class SettingsPageViewModel extends Context {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// load
|
// load
|
||||||
loadListRelevantData = (): void => {
|
preloadData = (): void => {
|
||||||
this.primaryChannel.value =
|
this.primaryChannel.value =
|
||||||
this.chatViewModel.chatModel.info.primaryChannel;
|
this.chatViewModel.chatModel.info.primaryChannel;
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ export default class SettingsPageViewModel extends Context {
|
|||||||
) {
|
) {
|
||||||
super("settings");
|
super("settings");
|
||||||
|
|
||||||
this.loadListRelevantData();
|
this.preloadData();
|
||||||
|
|
||||||
this.cannotSetEncryptionKey = React.createProxyState(
|
this.cannotSetEncryptionKey = React.createProxyState(
|
||||||
[this.encryptionKeyInput],
|
[this.encryptionKeyInput],
|
||||||
|
|||||||
@@ -174,6 +174,8 @@ export default class TaskPageViewModel extends ContextHost<string> {
|
|||||||
) {
|
) {
|
||||||
super("task-page");
|
super("task-page");
|
||||||
|
|
||||||
|
this.loadData(); // needed for board options in calendar
|
||||||
|
|
||||||
this.chatViewModel = chatViewModel;
|
this.chatViewModel = chatViewModel;
|
||||||
|
|
||||||
// context
|
// context
|
||||||
|
|||||||
Reference in New Issue
Block a user