diff --git a/dist/index.js b/dist/index.js index 63ed8887..993c8c41 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1422,8 +1422,8 @@ ); this.taskPageViewModel.updateBoard(newBoardInfoFileContent); }; - applyColor = (newColor) => { - this.taskPageViewModel.chatViewModel.setDisplayedColor(newColor); + applyColor = () => { + this.taskPageViewModel.chatViewModel.setDisplayedColor(this.color.value); }; // load loadListRelevantData = () => { @@ -1441,8 +1441,9 @@ [this.taskPageViewModel.selectedBoardId], () => this.taskPageViewModel.selectedBoardId.value == this.boardInfo.fileId ); - this.color.subscribeSilent((newColor) => { - this.applyColor(newColor); + this.color.subscribe(() => { + if (this.isSelected.value == false) return; + this.applyColor(); }); } }; diff --git a/src/ViewModel/Pages/boardViewModel.ts b/src/ViewModel/Pages/boardViewModel.ts index 1fd69d61..df636835 100644 --- a/src/ViewModel/Pages/boardViewModel.ts +++ b/src/ViewModel/Pages/boardViewModel.ts @@ -46,8 +46,8 @@ export default class BoardViewModel { this.taskPageViewModel.updateBoard(newBoardInfoFileContent); }; - applyColor = (newColor: Color): void => { - this.taskPageViewModel.chatViewModel.setDisplayedColor(newColor); + applyColor = (): void => { + this.taskPageViewModel.chatViewModel.setDisplayedColor(this.color.value); }; // load @@ -74,8 +74,9 @@ export default class BoardViewModel { this.taskPageViewModel.selectedBoardId.value == this.boardInfo.fileId ); - this.color.subscribeSilent((newColor) => { - this.applyColor(newColor); + this.color.subscribe(() => { + if (this.isSelected.value == false) return; + this.applyColor(); }); } }