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,
};
}