fix bug where new board colors would be applied even with other pages open

This commit is contained in:
marlon-erler
2026-04-08 13:56:33 +00:00
parent d9211f6fd2
commit cd665b0335
3 changed files with 7 additions and 3 deletions
+3 -2
View File
@@ -2525,6 +2525,7 @@
); );
this.color.subscribe(() => { this.color.subscribe(() => {
if (this.isSelected.value == false) return; if (this.isSelected.value == false) return;
if (this.chatViewModel.selectedPage.value != "tasks" /* Tasks */) return;
this.applyColor(); this.applyColor();
}); });
this.selectedPage.subscribeSilent(() => { this.selectedPage.subscribeSilent(() => {
@@ -3233,7 +3234,7 @@
var translations = allTranslations[language] || allTranslations.en; var translations = allTranslations[language] || allTranslations.en;
// src/ViewModel/Chat/chatViewModel.ts // src/ViewModel/Chat/chatViewModel.ts
var ChatViewModel = class { var ChatViewModel2 = class {
// init // init
constructor(coreViewModel, storageModel2, chatModel, settingsViewModel2, notificationViewModel, connectionViewModel2, chatListViewModel2) { constructor(coreViewModel, storageModel2, chatModel, settingsViewModel2, notificationViewModel, connectionViewModel2, chatListViewModel2) {
this.coreViewModel = coreViewModel; this.coreViewModel = coreViewModel;
@@ -3464,7 +3465,7 @@
this.chatViewModels.remove(chatViewModel); this.chatViewModels.remove(chatViewModel);
}; };
this.createChatViewModel = (chatModel) => { this.createChatViewModel = (chatModel) => {
return new ChatViewModel( return new ChatViewModel2(
this.coreViewModel, this.coreViewModel,
this.storageModel, this.storageModel,
chatModel, chatModel,
+2
View File
@@ -1,6 +1,8 @@
{ {
"name": "Comms", "name": "Comms",
"display": "standalone", "display": "standalone",
"theme_color": "black",
"background_color": "black",
"icons": [ "icons": [
{ {
"src": "icon.png", "src": "icon.png",
+2 -1
View File
@@ -5,7 +5,7 @@ import BoardsAndTasksModel, {
TaskFileContent, TaskFileContent,
} from "../../Model/Files/boardsAndTasksModel"; } from "../../Model/Files/boardsAndTasksModel";
import ChatViewModel from "../Chat/chatViewModel"; import ChatViewModel, { ChatPageType } from "../Chat/chatViewModel";
import { Color } from "../../colors"; import { Color } from "../../colors";
import CoreViewModel from "../Global/coreViewModel"; import CoreViewModel from "../Global/coreViewModel";
import SearchViewModel from "../Utility/searchViewModel"; import SearchViewModel from "../Utility/searchViewModel";
@@ -273,6 +273,7 @@ export default class BoardViewModel extends TaskContainingPageViewModel {
this.color.subscribe(() => { this.color.subscribe(() => {
if (this.isSelected.value == false) return; if (this.isSelected.value == false) return;
if (this.chatViewModel.selectedPage.value != ChatPageType.Tasks) return;
this.applyColor(); this.applyColor();
}); });