Adrià Vilanova Martínez | 58cc67c | 2024-04-21 16:43:01 +0200 | [diff] [blame] | 1 | import CssSelectorNodeWatcherScriptHandler from '../../../common/architecture/scripts/nodeWatcher/handlers/CssSelectorNodeWatcherScriptHandler'; |
Adrià Vilanova Martínez | 43c7520 | 2024-10-19 15:55:15 +0200 | [diff] [blame] | 2 | import { NodeMutationType } from '../../../presentation/nodeWatcher/NodeWatcherHandler'; |
Adrià Vilanova Martínez | 58cc67c | 2024-04-21 16:43:01 +0200 | [diff] [blame] | 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 | |
Adrià Vilanova Martínez | e7f9be8 | 2024-05-31 22:37:04 +0200 | [diff] [blame] | 15 | onMutatedNode() { |
Adrià Vilanova Martínez | 58cc67c | 2024-04-21 16:43:01 +0200 | [diff] [blame] | 16 | this.options.autoRefresh.hideUpdatePrompt(); |
| 17 | } |
| 18 | } |