Adrià Vilanova MartÃnez | 58cc67c | 2024-04-21 16:43:01 +0200 | [diff] [blame] | 1 | import CssSelectorNodeWatcherScriptHandler from '../../../common/architecture/scripts/nodeWatcher/handlers/CssSelectorNodeWatcherScriptHandler'; |
| 2 | import { NodeMutation, NodeMutationType } from '../../../common/nodeWatcher/NodeWatcherHandler'; |
| 3 | import { AutoRefreshNodeWatcherDependencies } from '../scripts/nodeWatcher.script'; |
| 4 | |
| 5 | /** |
| 6 | * Removes the snackbar when exiting thread list view. |
| 7 | */ |
| 8 | export default class AutoRefreshThreadListHideHandler extends CssSelectorNodeWatcherScriptHandler<AutoRefreshNodeWatcherDependencies> { |
| 9 | cssSelector = 'ec-thread-list'; |
| 10 | |
| 11 | readonly mutationTypesProcessed: NodeMutationType[] = [ |
| 12 | NodeMutationType.RemovedNode, |
| 13 | ]; |
| 14 | |
| 15 | onMutatedNode(_: NodeMutation) { |
| 16 | this.options.autoRefresh.hideUpdatePrompt(); |
| 17 | } |
| 18 | } |