blob: c03b5bd8aafdd4395e4eda0b4871a09b39a3fb2b [file] [log] [blame]
import CssSelectorNodeWatcherHandler from '../../../../infrastructure/presentation/nodeWatcher/handlers/CssSelectorHandler.adapter';
import { NodeMutation } from '../../../../presentation/nodeWatcher/NodeWatcherHandler';
import FlattenThreads, {
kAdditionalInfoSelector,
} from '../../core/flattenThreads';
/** Delete additional info in the edit message box */
export default class FlattenThreadsAdditionalInfoHandler extends CssSelectorNodeWatcherHandler {
cssSelector = kAdditionalInfoSelector;
constructor(private flattenThreads: FlattenThreads) {
super();
}
onMutatedNode({ node }: NodeMutation) {
this.flattenThreads.deleteAdditionalInfoElementIfApplicable(node);
}
}