. * */ namespace OCA\Talk\Files; use OCP\Util; use Symfony\Component\EventDispatcher\EventDispatcherInterface; /** * Helper class to add the Talk UI to the sidebar of the Files app. */ class TemplateLoader { public static function register(EventDispatcherInterface $dispatcher): void { $dispatcher->addListener('OCA\Files::loadAdditionalScripts', function() { self::loadTalkSidebarForFilesApp(); }); } /** * Loads the Talk UI in the sidebar of the Files app. * * This method should be called when loading additional scripts for the * Files app. */ public static function loadTalkSidebarForFilesApp(): void { Util::addStyle('spreed', 'merged-files'); Util::addScript('spreed', 'merged-files'); } }