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
+2 -2
View File
@@ -1,7 +1,7 @@
import * as React from "bloatless-react";
import ChatModel, { ChatMessage } from "../../Model/Chat/chatModel";
import StorageModel, { filePaths } from "../../Model/Global/storageModel";
import StorageModel, { StorageModelSubPath, filePaths } from "../../Model/Global/storageModel";
import ChatListViewModel from "./chatListViewModel";
import { Color } from "../../colors";
@@ -62,7 +62,7 @@ export default class ChatViewModel {
// load
loadPageSelection = (): void => {
const path: string[] = StorageModel.getPath(
"chat",
StorageModelSubPath.Chat,
filePaths.chat.lastUsedPage(this.chatModel.id)
);
const lastUsedPage: string | null = this.storageModel.read(path);