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
-2
View File
@@ -1,12 +1,10 @@
import * as React from "bloatless-react";
import ChatListModel from "../../Model/Chat/chatListModel";
import ChatModel from "../../Model/Chat/chatModel";
import ChatViewModel from "./chatViewModel";
import CoreViewModel from "../Global/coreViewModel";
import { IndexManager } from "../../Model/Utility/utility";
import SettingsViewModel from "../Global/settingsViewModel";
import StorageModel from "../../Model/Global/storageModel";
import ConnectionViewModel from "../Global/connectionViewModel";
import NotificationViewModel from "../Global/notificationViewModel";
+11 -7
View File
@@ -58,14 +58,9 @@ export default class ChatViewModel extends ContextHost<ChatPageTypes> {
this.chatListViewModel.openChat(this);
//this.selectedPage.callSubscriptions();
};
close = (): void => {
this.coreViewModel.closeContext(this.contextId);
this.chatListViewModel.closeChat();
};
openPage = (page: ChatPageTypes): void => {
this.closeContext();
this.closeCurrentContext();
this.selectedPage.value = page;
};
@@ -140,6 +135,15 @@ export default class ChatViewModel extends ContextHost<ChatPageTypes> {
);
};
// exit
close = (): void => {
this.coreViewModel.closeContext(this.contextId);
};
handleContextClose = (): void => {
this.chatListViewModel.closeChat();
}
// init
constructor(
public readonly coreViewModel: CoreViewModel,