integrate context with window.history API
This commit is contained in:
@@ -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";
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user