integrate context with window.history API

This commit is contained in:
marlon-erler
2026-04-14 17:19:35 +00:00
parent 77fac64879
commit 9e9ede570d
13 changed files with 150 additions and 90 deletions
+9 -6
View File
@@ -9,7 +9,6 @@ import ChatViewModel, { ChatPageTypes } from "../Chat/chatViewModel";
import { Colors } from "../../colors";
import CoreViewModel from "../Global/coreViewModel";
import SearchViewModel from "../Utility/searchViewModel";
import StorageModel from "../../Model/Global/storageModel";
import TaskContainingPageViewModel from "./taskContainingPageViewModel";
import TaskPageViewModel from "./taskPageViewModel";
import TaskViewModel from "./taskViewModel";
@@ -164,6 +163,7 @@ export default class BoardViewModel extends TaskContainingPageViewModel {
close = (): void => {
this.taskPageViewModel.closeBoard();
this.taskPageViewModel.storeLastUsedBoard();
this.taskViewModels.clear();
};
@@ -246,6 +246,14 @@ export default class BoardViewModel extends TaskContainingPageViewModel {
this.loadSearchSuggestions();
};
// exit
handleContextClose = (fromHistoryEvent: boolean): void => {
this.taskPageViewModel.handleBoardClosed(this);
if (!fromHistoryEvent) return;
this.taskPageViewModel.storeLastUsedBoard();
}
// init
constructor(
public readonly coreViewModel: CoreViewModel,
@@ -276,11 +284,6 @@ export default class BoardViewModel extends TaskContainingPageViewModel {
this.selectedPage.subscribeSilent(() => {
this.storeLastUsedView();
console.log(
"SELECTED PAGE",
this.selectedPage.value,
this.contextId,
);
});
// handlers