integrate context with window.history API
This commit is contained in:
@@ -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