diff --git a/bun.lockb b/bun.lockb index eec18959..d05422a5 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/dist/index.js b/dist/index.js index 3d5691ab..56cce1a7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,9 +1,10 @@ (() => { - // ../../bloatless-react/index.ts + // node_modules/bloatless-react/index.ts var State = class { + _value; + _bindings = /* @__PURE__ */ new Set(); // init constructor(initialValue) { - this._bindings = /* @__PURE__ */ new Set(); this._value = initialValue; } // value @@ -31,11 +32,11 @@ } }; var ListState = class extends State { + additionHandlers = /* @__PURE__ */ new Set(); + removalHandlers = /* @__PURE__ */ new Map(); // init constructor(initialItems) { super(new Set(initialItems)); - this.additionHandlers = /* @__PURE__ */ new Set(); - this.removalHandlers = /* @__PURE__ */ new Map(); } // list add(...items) { @@ -75,11 +76,11 @@ } }; var MapState = class extends State { + additionHandlers = /* @__PURE__ */ new Set(); + removalHandlers = /* @__PURE__ */ new Map(); // init constructor(initialItems) { super(new Map(initialItems)); - this.additionHandlers = /* @__PURE__ */ new Set(); - this.removalHandlers = /* @__PURE__ */ new Map(); } // list set(key, item) { @@ -120,7 +121,7 @@ function createProxyState(statesToSubscibe, fn) { const proxyState = new State(fn()); statesToSubscibe.forEach( - (state) => state.subscribe(() => proxyState.value = fn()) + (state) => state.subscribeSilent(() => proxyState.value = fn()) ); return proxyState; } @@ -2254,7 +2255,7 @@ this.connectionModel = connectionModel2; this.chatListModel = chatListModel2; this.fileTransferModel = fileTransferModel2; - this.BUILD = "Build 26.04.13.B"; + this.BUILD = "Build 26.04.13.C"; // CONTEXT this.contextStack = /* @__PURE__ */ new Map(); this.logContexts = () => { @@ -2314,7 +2315,8 @@ } }; var Context = class { - constructor() { + constructor(contextDebugDescription) { + this.contextDebugDescription = contextDebugDescription; this.contextId = v4_default(); this.keystrokes = /* @__PURE__ */ new Map(); this.handleKeystroke = (e) => { @@ -2393,13 +2395,12 @@ var TaskViewModel = class extends Context { // init constructor(coreViewModel2, chatViewModel, boardsAndTasksModel, containingModel, task) { - super(); + super("task"); this.coreViewModel = coreViewModel2; this.chatViewModel = chatViewModel; this.boardsAndTasksModel = boardsAndTasksModel; this.containingModel = containingModel; this.task = task; - this.contextDebugDescription = "task"; // paths this.getFilePath = () => { return this.boardsAndTasksModel.getTaskFilePath(this.task.fileId); @@ -2565,8 +2566,8 @@ // src/ViewModel/Pages/taskContainingPageViewModel.ts var TaskContainingPageViewModel = class extends Context { // init - constructor(coreViewModel2, chatViewModel, boardsAndTasksModel) { - super(); + constructor(coreViewModel2, chatViewModel, boardsAndTasksModel, contextDebugDescription) { + super(contextDebugDescription); this.coreViewModel = coreViewModel2; this.chatViewModel = chatViewModel; this.boardsAndTasksModel = boardsAndTasksModel; @@ -2614,12 +2615,11 @@ var CalendarPageViewModel = class extends TaskContainingPageViewModel { // init constructor(coreViewModel2, chatViewModel, calendarModel, boardsAndTasksModel) { - super(coreViewModel2, chatViewModel, boardsAndTasksModel); + super(coreViewModel2, chatViewModel, boardsAndTasksModel, "calendar"); this.coreViewModel = coreViewModel2; this.chatViewModel = chatViewModel; this.calendarModel = calendarModel; this.boardsAndTasksModel = boardsAndTasksModel; - this.contextDebugDescription = "calendar"; // paths this.getBasePath = () => { return [...this.calendarModel.getViewPath()]; @@ -2960,10 +2960,9 @@ var MessagePageViewModel = class extends Context { // init constructor(coreViewModel2, chatViewModel) { - super(); + super("message-page"); this.coreViewModel = coreViewModel2; this.chatViewModel = chatViewModel; - this.contextDebugDescription = "message-page"; // state this.chatMessageViewModels = new MapState(); this.filteredMessageViewModels = new ListState(); @@ -3070,10 +3069,9 @@ var SettingsPageViewModel = class extends Context { // init constructor(coreViewModel2, chatViewModel) { - super(); + super("settings"); this.coreViewModel = coreViewModel2; this.chatViewModel = chatViewModel; - this.contextDebugDescription = "settings"; // state this.primaryChannel = new State(""); this.primaryChannelInput = new State(""); @@ -3164,13 +3162,12 @@ var BoardViewModel = class extends TaskContainingPageViewModel { // init constructor(coreViewModel2, chatViewModel, boardsAndTasksModel, taskPageViewModel, boardInfo) { - super(coreViewModel2, chatViewModel, boardsAndTasksModel); + super(coreViewModel2, chatViewModel, boardsAndTasksModel, "board"); this.coreViewModel = coreViewModel2; this.chatViewModel = chatViewModel; this.boardsAndTasksModel = boardsAndTasksModel; this.taskPageViewModel = taskPageViewModel; this.boardInfo = boardInfo; - this.contextDebugDescription = "board"; // state this.name = new State(""); this.color = new State("standard" /* Standard */); @@ -3396,11 +3393,10 @@ var TaskPageViewModel = class extends ContextHost { // init constructor(coreViewModel2, chatViewModel, boardsAndTasksModel) { - super(); + super("task-page"); this.coreViewModel = coreViewModel2; this.chatViewModel = chatViewModel; this.boardsAndTasksModel = boardsAndTasksModel; - this.contextDebugDescription = "task-page"; // data this.boardIndexManager = new IndexManager( (boardViewModel) => boardViewModel.name.value @@ -3496,6 +3492,8 @@ }; // load this.loadData = () => { + console.log("LOADING TASK PAGE DATA"); + this.closeContext(); this.boardViewModels.clear(); const boardIds = this.boardsAndTasksModel.listBoardIds(); for (const boardId of boardIds) { @@ -3509,14 +3507,17 @@ this.chatViewModel = chatViewModel; this.chatViewModel.registerContext("tasks" /* Tasks */, this); this.selectedBoardId.subscribeSilent(this.updateContexts); - this.loadData(); boardsAndTasksModel.boardHandlerManager.addHandler( (boardInfoFileContent) => { this.showBoardInList(boardInfoFileContent); this.updateBoardIndices(); - this.updateContexts(); } ); + this.chatViewModel.currentContext.subscribeSilent((context) => { + if (!this.isOpen) return; + if (context != this) return; + this.openLastUsedBoard(); + }); this.registerKeyStroke("." /* Options */, this.toggleBoardList); } // context @@ -3532,14 +3533,13 @@ var ChatViewModel6 = class extends ContextHost { // init constructor(coreViewModel2, chatModel, settingsViewModel2, notificationViewModel, connectionViewModel2, chatListViewModel2) { - super(); + super("chat"); this.coreViewModel = coreViewModel2; this.chatModel = chatModel; this.settingsViewModel = settingsViewModel2; this.notificationViewModel = notificationViewModel; this.connectionViewModel = connectionViewModel2; this.chatListViewModel = chatListViewModel2; - this.contextDebugDescription = "chat"; // state this.displayedColor = new State("standard" /* Standard */); this.selectedPage = new State( @@ -3562,8 +3562,6 @@ this.closeContext(); this.selectedPage.value = page; }; - this.closeSubPages = () => { - }; this.setColor = (color) => { this.setDisplayedColor(color); this.chatModel.setColor(color); @@ -3586,7 +3584,7 @@ ); const lastUsedPage = this.coreViewModel.storageModel.read(path); if (lastUsedPage != null) { - this.selectedPage.value = lastUsedPage; + this.openPage(lastUsedPage); } this.selectedPage.subscribeSilent((newPage) => { this.coreViewModel.storageModel.write(path, newPage); @@ -3714,7 +3712,7 @@ (chat2) => chat2.chatModel.info.primaryChannel == notification.chat ); chat.open(); - chat.selectedPage.value = "messages" /* Messages */; + chat.openPage("messages" /* Messages */); }; // loop this.loop = () => { @@ -4288,7 +4286,7 @@ // src/View/Components/chatViewToggleButton.tsx function ChatViewToggleButton(label, icon, page, chatViewModel) { function select() { - chatViewModel.selectedPage.value = page; + chatViewModel.openPage(page); } const isSelected = createProxyState( [chatViewModel.selectedPage], @@ -5419,7 +5417,6 @@ const mainContent = createProxyState( [chatViewModel.selectedPage], () => { - chatViewModel.closeSubPages(); switch (chatViewModel.selectedPage.value) { case "settings" /* Settings */: { return SettingsPage( @@ -5974,9 +5971,8 @@ var FileTransferViewModel = class extends Context { // init constructor(coreViewModel2) { - super(); + super("file-transfer"); this.coreViewModel = coreViewModel2; - this.contextDebugDescription = "transfer"; // state this.presentedModal = new State(void 0); this.generalFileOptions = new ListState(); @@ -6691,9 +6687,8 @@ var SettingsViewModel = class _SettingsViewModel extends Context { // init constructor(coreViewModel2) { - super(); + super("settings"); this.coreViewModel = coreViewModel2; - this.contextDebugDescription = "settings"; // state this.username = new State(""); this.usernameInput = new State(""); @@ -6909,9 +6904,8 @@ var StorageViewModel = class extends Context { // init constructor(coreViewModel2) { - super(); + super("storage"); this.coreViewModel = coreViewModel2; - this.contextDebugDescription = "storage"; // state this.isShowingStorageModal = new State(false); this.selectedPath = new State( @@ -7318,13 +7312,12 @@ // src/ViewModel/Pages/homeViewModel.ts var HomeViewModel = class extends Context { constructor(coreViewModel2, settingsViewModel2, fileTransferViewModel2, storageViewModel2, connectionViewModel2) { - super(); + super("home"); this.coreViewModel = coreViewModel2; this.settingsViewModel = settingsViewModel2; this.fileTransferViewModel = fileTransferViewModel2; this.storageViewModel = storageViewModel2; this.connectionViewModel = connectionViewModel2; - this.contextDebugDescription = "home"; this.coreViewModel.context = this; this.registerKeyStroke( "," /* Settings */, diff --git a/package.json b/package.json index 95fb8dee..455f2629 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "dependencies": { "@types/uuid": "^10.0.0", - "bloatless-react": "^1.3.11", - "esbuild": "^0.23.0", + "bloatless-react": "1.3.14", + "esbuild": "^0.23.1", "udn-frontend": "^1.0.9", "uuid": "^10.0.0" }, diff --git a/src/View/Components/chatViewToggleButton.tsx b/src/View/Components/chatViewToggleButton.tsx index 2a01b28c..1557cb9f 100644 --- a/src/View/Components/chatViewToggleButton.tsx +++ b/src/View/Components/chatViewToggleButton.tsx @@ -13,7 +13,7 @@ export function ChatViewToggleButton( chatViewModel: ChatViewModel, ) { function select() { - chatViewModel.selectedPage.value = page; + chatViewModel.openPage(page); } const isSelected = React.createProxyState( diff --git a/src/View/chatPage.tsx b/src/View/chatPage.tsx index f15347b7..8aebe653 100644 --- a/src/View/chatPage.tsx +++ b/src/View/chatPage.tsx @@ -18,8 +18,6 @@ export function ChatPage( const mainContent = React.createProxyState( [chatViewModel.selectedPage], () => { - chatViewModel.closeSubPages(); - switch (chatViewModel.selectedPage.value) { case ChatPageTypes.Settings: { return SettingsPage( diff --git a/src/ViewModel/Chat/chatViewModel.ts b/src/ViewModel/Chat/chatViewModel.ts index baa41ced..f72c6785 100644 --- a/src/ViewModel/Chat/chatViewModel.ts +++ b/src/ViewModel/Chat/chatViewModel.ts @@ -26,8 +26,6 @@ import { v4 } from "uuid"; import { CommonKeys } from "../../View/keystrokes"; export default class ChatViewModel extends ContextHost { - contextDebugDescription = "chat"; - calendarViewModel: CalendarPageViewModel; taskPageViewModel: TaskPageViewModel; messagePageViewModel: MessagePageViewModel; @@ -58,6 +56,7 @@ export default class ChatViewModel extends ContextHost { open = (): void => { this.coreViewModel.context = this; this.chatListViewModel.openChat(this); + //this.selectedPage.callSubscriptions(); }; close = (): void => { @@ -70,8 +69,6 @@ export default class ChatViewModel extends ContextHost { this.selectedPage.value = page; }; - closeSubPages = (): void => {}; - setColor = (color: Colors): void => { this.setDisplayedColor(color); this.chatModel.setColor(color); @@ -100,7 +97,7 @@ export default class ChatViewModel extends ContextHost { const lastUsedPage: string | null = this.coreViewModel.storageModel.read(path); if (lastUsedPage != null) { - this.selectedPage.value = lastUsedPage as any; + this.openPage(lastUsedPage as ChatPageTypes); } this.selectedPage.subscribeSilent((newPage) => { @@ -152,7 +149,7 @@ export default class ChatViewModel extends ContextHost { public readonly connectionViewModel: ConnectionViewModel, public readonly chatListViewModel: ChatListViewModel, ) { - super(); + super("chat"); // page viewModels this.calendarViewModel = new CalendarPageViewModel( diff --git a/src/ViewModel/Global/coreViewModel.ts b/src/ViewModel/Global/coreViewModel.ts index 43237fda..4289ff6e 100644 --- a/src/ViewModel/Global/coreViewModel.ts +++ b/src/ViewModel/Global/coreViewModel.ts @@ -94,7 +94,6 @@ export default class CoreViewModel { export class Context { contextId = v4(); - contextDebugDescription: string; keystrokes = new Map void>(); handleKeystroke = (e: KeyboardEvent): boolean => { @@ -112,6 +111,8 @@ export class Context { registerKeyStroke = (key: string, fn: () => void): void => { this.keystrokes.set(key, fn); }; + + constructor(public contextDebugDescription: string) {} } export class ContextHost extends Context { diff --git a/src/ViewModel/Global/fileTransferViewModel.ts b/src/ViewModel/Global/fileTransferViewModel.ts index 7ec53498..3ca1b8a5 100644 --- a/src/ViewModel/Global/fileTransferViewModel.ts +++ b/src/ViewModel/Global/fileTransferViewModel.ts @@ -13,8 +13,6 @@ import CoreViewModel, { Context } from "./coreViewModel"; import { CommonKeys } from "../../View/keystrokes"; export default class FileTransferViewModel extends Context { - contextDebugDescription = "transfer"; - // state presentedModal: React.State = new React.State(undefined); @@ -173,7 +171,7 @@ export default class FileTransferViewModel extends Context { // init constructor(public readonly coreViewModel: CoreViewModel) { - super(); + super("file-transfer"); this.coreViewModel.fileTransferModel.fileHandlerManager.addHandler( this.handleReceivedFile, diff --git a/src/ViewModel/Global/notificationViewModel.ts b/src/ViewModel/Global/notificationViewModel.ts index 0ee993c3..5616ce9d 100644 --- a/src/ViewModel/Global/notificationViewModel.ts +++ b/src/ViewModel/Global/notificationViewModel.ts @@ -42,7 +42,7 @@ export default class NotificationViewModel { (chat) => chat.chatModel.info.primaryChannel == notification.chat, ); chat.open(); - chat.selectedPage.value = ChatPageTypes.Messages; + chat.openPage(ChatPageTypes.Messages); }; // loop diff --git a/src/ViewModel/Global/settingsViewModel.ts b/src/ViewModel/Global/settingsViewModel.ts index ffddb8fe..99202a5a 100644 --- a/src/ViewModel/Global/settingsViewModel.ts +++ b/src/ViewModel/Global/settingsViewModel.ts @@ -5,8 +5,6 @@ import { Languages, ThemeSettings } from "../../Model/Global/settingsModel"; import { CommonKeys } from "../../View/keystrokes"; export default class SettingsViewModel extends Context { - contextDebugDescription = "settings"; - // state username: React.State = new React.State(""); usernameInput: React.State = new React.State(""); @@ -73,7 +71,7 @@ export default class SettingsViewModel extends Context { // init constructor(public readonly coreViewModel: CoreViewModel) { - super(); + super("settings"); this.username.value = coreViewModel.settingsModel.username; this.usernameInput.value = coreViewModel.settingsModel.username; diff --git a/src/ViewModel/Global/storageViewModel.ts b/src/ViewModel/Global/storageViewModel.ts index f7e0602c..2561d42d 100644 --- a/src/ViewModel/Global/storageViewModel.ts +++ b/src/ViewModel/Global/storageViewModel.ts @@ -8,8 +8,6 @@ import CoreViewModel, { Context } from "./coreViewModel"; import { CommonKeys } from "../../View/keystrokes"; export default class StorageViewModel extends Context { - contextDebugDescription = "storage"; - // state isShowingStorageModal: React.State = new React.State(false); selectedPath: React.State = new React.State( @@ -67,7 +65,7 @@ export default class StorageViewModel extends Context { // init constructor(public readonly coreViewModel: CoreViewModel) { - super(); + super("storage"); this.selectedFileName = React.createProxyState( [this.selectedPath], diff --git a/src/ViewModel/Pages/boardViewModel.ts b/src/ViewModel/Pages/boardViewModel.ts index 3cc9445d..d71f5f65 100644 --- a/src/ViewModel/Pages/boardViewModel.ts +++ b/src/ViewModel/Pages/boardViewModel.ts @@ -16,8 +16,6 @@ import TaskViewModel from "./taskViewModel"; import { CommonKeys } from "../../View/keystrokes"; export default class BoardViewModel extends TaskContainingPageViewModel { - contextDebugDescription = "board"; - // state name: React.State = new React.State(""); color: React.State = new React.State(Colors.Standard); @@ -255,7 +253,7 @@ export default class BoardViewModel extends TaskContainingPageViewModel { public readonly taskPageViewModel: TaskPageViewModel, public readonly boardInfo: BoardInfoFileContent, ) { - super(coreViewModel, chatViewModel, boardsAndTasksModel); + super(coreViewModel, chatViewModel, boardsAndTasksModel, "board"); // load this.loadListRelevantData(); diff --git a/src/ViewModel/Pages/calendarPageViewModel.ts b/src/ViewModel/Pages/calendarPageViewModel.ts index fe7b047a..81a9e2eb 100644 --- a/src/ViewModel/Pages/calendarPageViewModel.ts +++ b/src/ViewModel/Pages/calendarPageViewModel.ts @@ -14,8 +14,6 @@ import { CommonKeys } from "../../View/keystrokes"; export const CALENDAR_EVENT_BOARD_ID = "events"; export default class CalendarPageViewModel extends TaskContainingPageViewModel { - contextDebugDescription = "calendar"; - // data get monthString(): string { return CalendarModel.getMonthString( @@ -190,7 +188,7 @@ export default class CalendarPageViewModel extends TaskContainingPageViewModel { public readonly calendarModel: CalendarModel, public readonly boardsAndTasksModel: BoardsAndTasksModel, ) { - super(coreViewModel, chatViewModel, boardsAndTasksModel); + super(coreViewModel, chatViewModel, boardsAndTasksModel, "calendar"); this.calendarModel = calendarModel; this.boardsAndTasksModel = boardsAndTasksModel; diff --git a/src/ViewModel/Pages/homeViewModel.ts b/src/ViewModel/Pages/homeViewModel.ts index b5a5a741..424c67b6 100644 --- a/src/ViewModel/Pages/homeViewModel.ts +++ b/src/ViewModel/Pages/homeViewModel.ts @@ -6,8 +6,6 @@ import SettingsViewModel from "../Global/settingsViewModel"; import StorageViewModel from "../Global/storageViewModel"; export default class HomeViewModel extends Context { - contextDebugDescription = "home"; - constructor( public readonly coreViewModel: CoreViewModel, public readonly settingsViewModel: SettingsViewModel, @@ -15,7 +13,7 @@ export default class HomeViewModel extends Context { public readonly storageViewModel: StorageViewModel, public readonly connectionViewModel: ConnectionViewModel, ) { - super(); + super("home"); this.coreViewModel.context = this; diff --git a/src/ViewModel/Pages/messagePageViewModel.ts b/src/ViewModel/Pages/messagePageViewModel.ts index a8e9bf69..fc43c915 100644 --- a/src/ViewModel/Pages/messagePageViewModel.ts +++ b/src/ViewModel/Pages/messagePageViewModel.ts @@ -13,8 +13,6 @@ import { v4 } from "uuid"; import { CommonKeys } from "../../View/keystrokes"; export default class MessagePageViewModel extends Context { - contextDebugDescription = "message-page"; - // state chatMessageViewModels: React.MapState = new React.MapState(); @@ -130,7 +128,7 @@ export default class MessagePageViewModel extends Context { public readonly coreViewModel: CoreViewModel, public readonly chatViewModel: ChatViewModel, ) { - super(); + super("message-page"); // states this.cannotSendMessage = React.createProxyState( diff --git a/src/ViewModel/Pages/settingsPageViewModel.ts b/src/ViewModel/Pages/settingsPageViewModel.ts index ac19b879..1a9c0312 100644 --- a/src/ViewModel/Pages/settingsPageViewModel.ts +++ b/src/ViewModel/Pages/settingsPageViewModel.ts @@ -5,8 +5,6 @@ import { Colors } from "../../colors"; import CoreViewModel, { Context } from "../Global/coreViewModel"; export default class SettingsPageViewModel extends Context { - contextDebugDescription = "settings"; - // state primaryChannel: React.State = new React.State(""); primaryChannelInput: React.State = new React.State(""); @@ -115,7 +113,7 @@ export default class SettingsPageViewModel extends Context { public readonly coreViewModel: CoreViewModel, public readonly chatViewModel: ChatViewModel, ) { - super(); + super("settings"); this.loadListRelevantData(); diff --git a/src/ViewModel/Pages/taskContainingPageViewModel.ts b/src/ViewModel/Pages/taskContainingPageViewModel.ts index 325a7e06..bdc810aa 100644 --- a/src/ViewModel/Pages/taskContainingPageViewModel.ts +++ b/src/ViewModel/Pages/taskContainingPageViewModel.ts @@ -59,7 +59,8 @@ export default class TaskContainingPageViewModel extends Context { public readonly coreViewModel: CoreViewModel, public readonly chatViewModel: ChatViewModel, public readonly boardsAndTasksModel: BoardsAndTasksModel, + contextDebugDescription: string, ) { - super(); + super(contextDebugDescription); } } diff --git a/src/ViewModel/Pages/taskPageViewModel.ts b/src/ViewModel/Pages/taskPageViewModel.ts index b3980d28..c4ab812b 100644 --- a/src/ViewModel/Pages/taskPageViewModel.ts +++ b/src/ViewModel/Pages/taskPageViewModel.ts @@ -11,8 +11,6 @@ import { IndexManager } from "../../Model/Utility/utility"; import { CommonKeys } from "../../View/keystrokes"; export default class TaskPageViewModel extends ContextHost { - contextDebugDescription = "task-page"; - // data readonly boardIndexManager = new IndexManager( (boardViewModel: BoardViewModel) => boardViewModel.name.value, @@ -145,6 +143,8 @@ export default class TaskPageViewModel extends ContextHost { // load loadData = (): void => { + console.log("LOADING TASK PAGE DATA"); + this.closeContext(); this.boardViewModels.clear(); const boardIds: string[] = this.boardsAndTasksModel.listBoardIds(); @@ -166,7 +166,7 @@ export default class TaskPageViewModel extends ContextHost { public readonly chatViewModel: ChatViewModel, public readonly boardsAndTasksModel: BoardsAndTasksModel, ) { - super(); + super("task-page"); this.chatViewModel = chatViewModel; @@ -174,17 +174,20 @@ export default class TaskPageViewModel extends ContextHost { this.chatViewModel.registerContext(ChatPageTypes.Tasks, this); this.selectedBoardId.subscribeSilent(this.updateContexts); - this.loadData(); - // handlers boardsAndTasksModel.boardHandlerManager.addHandler( (boardInfoFileContent: BoardInfoFileContent) => { this.showBoardInList(boardInfoFileContent); this.updateBoardIndices(); - this.updateContexts(); }, ); + this.chatViewModel.currentContext.subscribeSilent((context) => { + if (!this.isOpen) return; + if (context != this) return; + this.openLastUsedBoard(); + }); + // keystrokes this.registerKeyStroke(CommonKeys.Options, this.toggleBoardList); } diff --git a/src/ViewModel/Pages/taskViewModel.ts b/src/ViewModel/Pages/taskViewModel.ts index 302f3539..25527f1d 100644 --- a/src/ViewModel/Pages/taskViewModel.ts +++ b/src/ViewModel/Pages/taskViewModel.ts @@ -13,8 +13,6 @@ import { v4 } from "uuid"; import { CommonKeys } from "../../View/keystrokes"; export default class TaskViewModel extends Context { - contextDebugDescription = "task"; - // util get sortingString(): string { const splitDate: string[] = this.date.value.split("-"); @@ -87,7 +85,6 @@ export default class TaskViewModel extends Context { // view open = (): void => { - console.log(this); this.coreViewModel.context = this; this.containingModel.selectTask(this); }; @@ -219,7 +216,7 @@ export default class TaskViewModel extends Context { public readonly containingModel: TaskContainingPageViewModel, public task: TaskFileContent, ) { - super(); + super("task"); // load this.loadAllData();