update color when change synced

This commit is contained in:
marlon-erler
2024-07-23 13:53:50 +02:00
parent 52b9eef54c
commit b575892075
2 changed files with 10 additions and 8 deletions
+5 -4
View File
@@ -1422,8 +1422,8 @@
); );
this.taskPageViewModel.updateBoard(newBoardInfoFileContent); this.taskPageViewModel.updateBoard(newBoardInfoFileContent);
}; };
applyColor = (newColor) => { applyColor = () => {
this.taskPageViewModel.chatViewModel.setDisplayedColor(newColor); this.taskPageViewModel.chatViewModel.setDisplayedColor(this.color.value);
}; };
// load // load
loadListRelevantData = () => { loadListRelevantData = () => {
@@ -1441,8 +1441,9 @@
[this.taskPageViewModel.selectedBoardId], [this.taskPageViewModel.selectedBoardId],
() => this.taskPageViewModel.selectedBoardId.value == this.boardInfo.fileId () => this.taskPageViewModel.selectedBoardId.value == this.boardInfo.fileId
); );
this.color.subscribeSilent((newColor) => { this.color.subscribe(() => {
this.applyColor(newColor); if (this.isSelected.value == false) return;
this.applyColor();
}); });
} }
}; };
+5 -4
View File
@@ -46,8 +46,8 @@ export default class BoardViewModel {
this.taskPageViewModel.updateBoard(newBoardInfoFileContent); this.taskPageViewModel.updateBoard(newBoardInfoFileContent);
}; };
applyColor = (newColor: Color): void => { applyColor = (): void => {
this.taskPageViewModel.chatViewModel.setDisplayedColor(newColor); this.taskPageViewModel.chatViewModel.setDisplayedColor(this.color.value);
}; };
// load // load
@@ -74,8 +74,9 @@ export default class BoardViewModel {
this.taskPageViewModel.selectedBoardId.value == this.boardInfo.fileId this.taskPageViewModel.selectedBoardId.value == this.boardInfo.fileId
); );
this.color.subscribeSilent((newColor) => { this.color.subscribe(() => {
this.applyColor(newColor); if (this.isSelected.value == false) return;
this.applyColor();
}); });
} }
} }