-
-/**
- * Network hook into the HTML head to enable infinite scroll.
- *
- * Since the HTML head is built after the module content has been generated, we need to retrieve the base query string
- * of the page to make the correct asynchronous call. This is obtained through the Pager that was instantiated in
- * networkThreadedView or networkFlatView.
- *
- * @param App $a
- * @param string $htmlhead The head tag HTML string
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
- * @global Pager $pager
- */
-function network_infinite_scroll_head(App $a, &$htmlhead)
-{
- /// @TODO this will have to be converted to a static property of the converted Module\Network class
- /**
- * @var $pager Pager
- */
- global $pager;
-
- if (DI::pConfig()->get(local_user(), 'system', 'infinite_scroll')
- && ($_GET['mode'] ?? '') != 'minimal'
- ) {
- $tpl = Renderer::getMarkupTemplate('infinite_scroll_head.tpl');
- $htmlhead .= Renderer::replaceMacros($tpl, [
- '$pageno' => $pager->getPage(),
- '$reload_uri' => $pager->getBaseQueryString()
- ]);
- }
-}