refactor: place all presentation code in a presentation folder
Some features didn't have this folder.
Bug: twpowertools:226
Change-Id: Ic9803e7ee66a15c6c9e083509e059e453a26ed0f
diff --git a/src/features/infiniteScroll/presentation/nodeWatcherHandlers/ccInfiniteScrollLoadMoreBar.handler.ts b/src/features/infiniteScroll/presentation/nodeWatcherHandlers/ccInfiniteScrollLoadMoreBar.handler.ts
new file mode 100644
index 0000000..c776588
--- /dev/null
+++ b/src/features/infiniteScroll/presentation/nodeWatcherHandlers/ccInfiniteScrollLoadMoreBar.handler.ts
@@ -0,0 +1,22 @@
+import { NodeMutation } from '../../../../presentation/nodeWatcher/NodeWatcherHandler';
+import CCInfiniteScroll from '../../core/ccInfiniteScroll';
+import CssSelectorNodeWatcherHandler from '../../../../infrastructure/presentation/nodeWatcher/handlers/CssSelectorHandler.adapter';
+
+export default class CCInfiniteScrollLoadMoreBarHandler extends CssSelectorNodeWatcherHandler {
+ cssSelector = '.load-more-bar';
+
+ constructor(private ccInfiniteScroll: CCInfiniteScroll) {
+ super();
+ }
+
+ onMutatedNode({ node }: NodeMutation) {
+ if (!(node instanceof Element)) {
+ console.error(
+ '[CCInfiniteScrollLoadMoreBarHandler] Node is not an Element: ',
+ node,
+ );
+ return;
+ }
+ this.ccInfiniteScroll.observeLoadMoreBar(node);
+ }
+}