fix bugs with message hiding
This commit is contained in:
@@ -127,10 +127,12 @@ export default class MessagePageViewModel extends Context {
|
||||
|
||||
revokeReactionFilter = (): void => {
|
||||
this.reactionFilter.value = undefined;
|
||||
this.chatViewModel.chatModel.storeFilter("");
|
||||
};
|
||||
|
||||
setReactionFilter = (content: ReactionSymbols): void => {
|
||||
this.reactionFilter.value = content;
|
||||
this.chatViewModel.chatModel.storeFilter(content);
|
||||
};
|
||||
|
||||
resetFilter = (): void => {
|
||||
@@ -196,6 +198,9 @@ export default class MessagePageViewModel extends Context {
|
||||
this.reactionFilter.value != undefined,
|
||||
);
|
||||
|
||||
const previousFilter = this.chatViewModel.chatModel.getFilter() as any;
|
||||
if (Object.values(ReactionSymbols).includes(previousFilter)) this.setReactionFilter(previousFilter);
|
||||
|
||||
// keystrokes
|
||||
this.registerKeyStroke(CommonKeys.Filter, this.showFilterModal);
|
||||
this.registerKeyStroke(CommonKeys.CloseOrCancel, () => {
|
||||
|
||||
Reference in New Issue
Block a user