fix bugs with message hiding
This commit is contained in:
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user