aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/lib/Controller
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2024-08-21 10:31:21 -0700
committerChristopher Ng <chrng8@gmail.com>2024-08-27 14:33:39 -0700
commit71e653c0bc0f365d4dbd863e797308334b307532 (patch)
treedce81062fa5eb3219c4d27461b89c777e683a11a /apps/files/lib/Controller
parenta740e60afc4bc9d77ccb1c68095e3468ffc5db30 (diff)
downloadnextcloud-server-71e653c0bc0f365d4dbd863e797308334b307532.tar.gz
nextcloud-server-71e653c0bc0f365d4dbd863e797308334b307532.zip
perf(files): Do not block files page load with server-side favorites retrieval
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/files/lib/Controller')
-rw-r--r--apps/files/lib/Controller/ViewController.php15
1 files changed, 0 insertions, 15 deletions
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php
index aa9aa81a814..e3d4c0a6aa0 100644
--- a/apps/files/lib/Controller/ViewController.php
+++ b/apps/files/lib/Controller/ViewController.php
@@ -8,7 +8,6 @@
namespace OCA\Files\Controller;
use OC\Files\FilenameValidator;
-use OCA\Files\Activity\Helper;
use OCA\Files\AppInfo\Application;
use OCA\Files\Event\LoadAdditionalScriptsEvent;
use OCA\Files\Event\LoadSearchPlugins;
@@ -54,7 +53,6 @@ class ViewController extends Controller {
private IUserSession $userSession,
private IAppManager $appManager,
private IRootFolder $rootFolder,
- private Helper $activityHelper,
private IInitialState $initialState,
private ITemplateManager $templateManager,
private UserConfig $userConfig,
@@ -146,18 +144,6 @@ class ViewController extends Controller {
$userId = $this->userSession->getUser()->getUID();
- // Get all the user favorites to create a submenu
- try {
- $userFolder = $this->rootFolder->getUserFolder($userId);
- $favElements = $this->activityHelper->getFavoriteNodes($userId, true);
- $favElements = array_map(fn (Folder $node) => [
- 'fileid' => $node->getId(),
- 'path' => $userFolder->getRelativePath($node->getPath()),
- ], $favElements);
- } catch (\RuntimeException $e) {
- $favElements = [];
- }
-
// If the file doesn't exists in the folder and
// exists in only one occurrence, redirect to that file
// in the correct folder
@@ -187,7 +173,6 @@ class ViewController extends Controller {
$this->initialState->provideInitialState('storageStats', $storageInfo);
$this->initialState->provideInitialState('config', $this->userConfig->getConfigs());
$this->initialState->provideInitialState('viewConfigs', $this->viewConfig->getConfigs());
- $this->initialState->provideInitialState('favoriteFolders', $favElements);
// File sorting user config
$filesSortingConfig = json_decode($this->config->getUserValue($userId, 'files', 'files_sorting_configs', '{}'), true);