cleanup path management

This commit is contained in:
marlon-erler
2024-07-25 16:44:08 +02:00
parent 1dc2da2514
commit c9d74972b8
10 changed files with 57 additions and 67 deletions
+5 -5
View File
@@ -9,7 +9,7 @@ import {
parseValidObject,
stringify,
} from "../Utility/utility";
import StorageModel, { filePaths } from "../Global/storageModel";
import StorageModel, { StorageModelSubPath, filePaths } from "../Global/storageModel";
import { decryptString, encryptString } from "../Utility/crypto";
import ChatListModel from "./chatListModel";
@@ -39,19 +39,19 @@ export default class ChatModel {
// paths
getBasePath = (): string[] => {
return StorageModel.getPath("chat", filePaths.chat.chatBase(this.id));
return StorageModel.getPath(StorageModelSubPath.Chat, filePaths.chat.chatBase(this.id));
};
getInfoPath = (): string[] => {
return StorageModel.getPath("chat", filePaths.chat.info(this.id));
return StorageModel.getPath(StorageModelSubPath.Chat, filePaths.chat.info(this.id));
};
getColorPath = (): string[] => {
return StorageModel.getPath("chat", filePaths.chat.color(this.id));
return StorageModel.getPath(StorageModelSubPath.Chat, filePaths.chat.color(this.id));
};
getMessageDirPath = (): string[] => {
return StorageModel.getPath("chat", filePaths.chat.messages(this.id));
return StorageModel.getPath(StorageModelSubPath.Chat, filePaths.chat.messages(this.id));
};
getMessagePath = (id: string): string[] => {