remodel ChatViewModel
This commit is contained in:
@@ -5,6 +5,7 @@ import FileModel, { FileContent } from "../Files/fileModel";
|
||||
import StorageModel, { filePaths } from "../Global/storageModel";
|
||||
import {
|
||||
createTimestamp,
|
||||
localeCompare,
|
||||
parseValidObject,
|
||||
stringify,
|
||||
} from "../Utility/utility";
|
||||
@@ -31,6 +32,10 @@ export default class ChatModel {
|
||||
|
||||
chatMessageHandler: (chatMessage: ChatMessage) => void = () => {};
|
||||
|
||||
get secondaryChannels(): string[] {
|
||||
return this.info.secondaryChannels.sort(localeCompare);
|
||||
}
|
||||
|
||||
// paths
|
||||
getBasePath = (): string[] => {
|
||||
return StorageModel.getPath("chat", filePaths.chat.chatBase(this.id));
|
||||
|
||||
Reference in New Issue
Block a user