refactor(infinite-scroll): migrate to the new DI architecture

Bug: twpowertools:226

Change-Id: I5f4156204327cc66e976821134cef667d57f7233
diff --git a/src/entryPoints/communityConsole/contentScripts/main.ts b/src/entryPoints/communityConsole/contentScripts/main.ts
index fb6fa17..bb7fe6a 100644
--- a/src/entryPoints/communityConsole/contentScripts/main.ts
+++ b/src/entryPoints/communityConsole/contentScripts/main.ts
@@ -1,3 +1,6 @@
+// Run legacy Javascript entry point
+import '../../../contentScripts/communityConsole/main';
+
 import DependenciesProviderSingleton, {
   AutoRefreshDependency,
   OptionsProviderDependency,
@@ -11,7 +14,12 @@
 import AutoRefreshThreadListHideHandler from '../../../features/autoRefresh/presentation/nodeWatcherHandlers/threadListHide.handler';
 import AutoRefreshThreadListSetUpHandler from '../../../features/autoRefresh/presentation/nodeWatcherHandlers/threadListSetUp.handler';
 import AutoRefreshStylesScript from '../../../features/autoRefresh/presentation/scripts/styles.script';
+import ReportDialogColorThemeFix from '../../../features/ccDarkTheme/core/logic/reportDialog';
+import CCDarkThemeEcAppHandler from '../../../features/ccDarkTheme/nodeWatcherHandlers/ecApp.handler';
+import CCDarkThemeReportDialogHandler from '../../../features/ccDarkTheme/nodeWatcherHandlers/reportDialog.handler';
+import CCDarkThemeUnifiedProfilesIframeHandler from '../../../features/ccDarkTheme/nodeWatcherHandlers/unifiedProfilesIframe.handler';
 import Features from '../../../features/Features';
+import CCInfiniteScroll from '../../../features/infiniteScroll/core/ccInfiniteScroll';
 import { NodeWatcherAdapter } from '../../../infrastructure/presentation/nodeWatcher/NodeWatcher.adapter';
 import NodeWatcherScriptAdapter from '../../../infrastructure/presentation/scripts/NodeWatcherScript.adapter';
 import ScriptRunner from '../../../infrastructure/presentation/scripts/ScriptRunner';
@@ -19,13 +27,9 @@
 import { SortedScriptsProviderAdapter } from '../../../infrastructure/presentation/scripts/SortedScriptsProvider.adapter';
 import { NodeWatcherHandler } from '../../../presentation/nodeWatcher/NodeWatcherHandler';
 import StandaloneScripts from '../../../scripts/Scripts';
-
-// Run legacy Javascript entry point
-import '../../../contentScripts/communityConsole/main';
-import CCDarkThemeEcAppHandler from '../../../features/ccDarkTheme/nodeWatcherHandlers/ecApp.handler';
-import CCDarkThemeReportDialogHandler from '../../../features/ccDarkTheme/nodeWatcherHandlers/reportDialog.handler';
-import CCDarkThemeUnifiedProfilesIframeHandler from '../../../features/ccDarkTheme/nodeWatcherHandlers/unifiedProfilesIframe.handler';
-import ReportDialogColorThemeFix from '../../../features/ccDarkTheme/core/logic/reportDialog';
+import CCInfiniteScrollSetUpHandler from '../../../features/infiniteScroll/nodeWatcherHandlers/ccInfiniteScrollSetUp.handler';
+import CCInfiniteScrollLoadMoreBarHandler from '../../../features/infiniteScroll/nodeWatcherHandlers/ccInfiniteScrollLoadMoreBar.handler';
+import CCInfiniteScrollLoadMoreBtnHandler from '../../../features/infiniteScroll/nodeWatcherHandlers/ccInfiniteScrollLoadMoreBtn.handler';
 
 const scriptRunner = createScriptRunner();
 scriptRunner.run();
@@ -37,6 +41,8 @@
     OptionsProviderDependency,
   );
 
+  const ccInfiniteScroll = new CCInfiniteScroll();
+
   const context: Context = {
     page: ScriptPage.CommunityConsole,
     environment: ScriptEnvironment.ContentScript,
@@ -70,6 +76,18 @@
               'ccDarkThemeUnifiedProfilesIframe',
               new CCDarkThemeUnifiedProfilesIframeHandler(optionsProvider),
             ],
+            [
+              'ccInfiniteScrollSetUp',
+              new CCInfiniteScrollSetUpHandler(ccInfiniteScroll),
+            ],
+            [
+              'ccInfiniteScrollLoadMoreBar',
+              new CCInfiniteScrollLoadMoreBarHandler(ccInfiniteScroll),
+            ],
+            [
+              'ccInfiniteScrollLoadMoreBtn',
+              new CCInfiniteScrollLoadMoreBtnHandler(ccInfiniteScroll),
+            ],
           ]),
         ),