integrate taskViewModel
This commit is contained in:
@@ -3,13 +3,14 @@ import * as React from "bloatless-react";
|
||||
import ChatListModel from "../../Model/Chat/chatListModel";
|
||||
import ChatModel from "../../Model/Chat/chatModel";
|
||||
import ChatViewModel from "./chatViewModel";
|
||||
import FileModel from "../../Model/Files/fileModel";
|
||||
import { IndexManager } from "../../Model/Utility/utility";
|
||||
import SettingsViewModel from "../Global/settingsViewModel";
|
||||
import StorageModel from "../../Model/Global/storageModel";
|
||||
|
||||
export default class ChatListViewModel {
|
||||
chatListModel: ChatListModel;
|
||||
storageModel: StorageModel;
|
||||
chatListModel: ChatListModel;
|
||||
settingsViewModel: SettingsViewModel;
|
||||
|
||||
// data
|
||||
@@ -55,8 +56,8 @@ export default class ChatListViewModel {
|
||||
|
||||
createChatViewModel = (chatModel: ChatModel): ChatViewModel => {
|
||||
return new ChatViewModel(
|
||||
chatModel,
|
||||
this.storageModel,
|
||||
chatModel,
|
||||
this.settingsViewModel,
|
||||
this
|
||||
);
|
||||
@@ -90,12 +91,12 @@ export default class ChatListViewModel {
|
||||
|
||||
// init
|
||||
constructor(
|
||||
chatListModel: ChatListModel,
|
||||
storageModel: StorageModel,
|
||||
chatListModel: ChatListModel,
|
||||
settingsViewModel: SettingsViewModel
|
||||
) {
|
||||
this.chatListModel = chatListModel;
|
||||
this.storageModel = storageModel;
|
||||
this.chatListModel = chatListModel;
|
||||
this.settingsViewModel = settingsViewModel;
|
||||
|
||||
this.loadChats();
|
||||
|
||||
@@ -77,21 +77,21 @@ export default class ChatViewModel {
|
||||
|
||||
// init
|
||||
constructor(
|
||||
chatModel: ChatModel,
|
||||
storageModel: StorageModel,
|
||||
chatModel: ChatModel,
|
||||
settingsViewModel: SettingsViewModel,
|
||||
chatListViewModel: ChatListViewModel
|
||||
) {
|
||||
// models
|
||||
this.chatModel = chatModel;
|
||||
this.storageModel = storageModel;
|
||||
this.chatModel = chatModel;
|
||||
this.settingsViewModel = settingsViewModel;
|
||||
this.chatListViewModel = chatListViewModel;
|
||||
|
||||
// page viewModels
|
||||
this.taskPageViewModel = new TaskPageViewModel(
|
||||
this.chatModel.fileModel.taskModel,
|
||||
this.storageModel,
|
||||
this.chatModel.fileModel.taskModel,
|
||||
this
|
||||
);
|
||||
this.messagePageViewModel = new MessagePageViewModel(this);
|
||||
|
||||
Reference in New Issue
Block a user