blob: c03b5bd8aafdd4395e4eda0b4871a09b39a3fb2b [file] [log] [blame]
Adrià Vilanova Martínez3c13a762024-11-09 23:03:32 +01001import CssSelectorNodeWatcherHandler from '../../../../infrastructure/presentation/nodeWatcher/handlers/CssSelectorHandler.adapter';
2import { NodeMutation } from '../../../../presentation/nodeWatcher/NodeWatcherHandler';
3import FlattenThreads, {
4 kAdditionalInfoSelector,
5} from '../../core/flattenThreads';
6
7/** Delete additional info in the edit message box */
8export default class FlattenThreadsAdditionalInfoHandler extends CssSelectorNodeWatcherHandler {
9 cssSelector = kAdditionalInfoSelector;
10
11 constructor(private flattenThreads: FlattenThreads) {
12 super();
13 }
14
15 onMutatedNode({ node }: NodeMutation) {
16 this.flattenThreads.deleteAdditionalInfoElementIfApplicable(node);
17 }
18}