fix bugs with message hiding

This commit is contained in:
marlon-erler
2026-09-24 02:11:03 +02:00
parent 46f8c5c98c
commit 8a1a51e6fe
6 changed files with 348 additions and 669 deletions
+13 -1
View File
@@ -95,6 +95,10 @@ export default class ChatModel {
return [...this.getReactionDirPath(), id];
};
readonly getPreviousFilterPath = (): string[] => {
return [StorageModelSubPaths.Chat, ...filePaths.chat.previousFilter(this.id)];
}
// handlers
readonly handleMessage = (body: string): void => {
const chatMessage: ChatMessage | null = parseValidObject(
@@ -265,6 +269,14 @@ export default class ChatModel {
this.storageModel.write(this.getColorPath(), this.color);
};
readonly storeFilter = (filter: string): void => {
this.storageModel.write(this.getPreviousFilterPath(), filter);
}
readonly getFilter = (): string => {
return this.storageModel.read(this.getPreviousFilterPath());
}
readonly delete = () => {
// untrack
this.chatListModel.untrackChat(this);
@@ -541,4 +553,4 @@ export const ChatMessageReactionReference: ChatMessageReaction = {
content: "",
isDeleting: false,
};
}
+1
View File
@@ -200,6 +200,7 @@ export default class FileModel {
export enum FileModelSubPath {
Data = "data",
Model = "model",
Chat = "chat",
ModelView = "view",
ModelTask = "tasks",
ModelCalendar = "calendar",
+1
View File
@@ -254,6 +254,7 @@ export const filePaths = {
...filePaths.chat.chatBase(id),
"reactions",
],
previousFilter: (id: string) => [...filePaths.chat.chatBase(id), "previous-filter"],
lastUsedPage: (id: string) => [
...filePaths.chat.chatBase(id),
"last-used-page",