From a1a5cc15fb7e3aeacef68c3cfdfc1685f6cb4d1a Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Fri, 12 May 2023 11:14:34 +0200 Subject: [PATCH] fix: remove now unneeded tags-count initial state Signed-off-by: Arthur Schiwon --- lib/Controller/PageController.php | 14 -------------- src/components/TagCover.vue | 1 - src/views/Tags.vue | 1 - 3 files changed, 16 deletions(-) diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index 9f3f92efe..9a32472e5 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -149,20 +149,6 @@ public function index(): TemplateResponse { $this->initialState->provideInitialState('nomedia-paths', $paths); - - $key = $user->getUID(); - $tagCounts = $this->tagCountsCache->get($key); - if ($tagCounts === null) { - $tags = $this->tagManager->getAllTags(true); - $tagCounts = []; - foreach ($tags as $tag) { - $search = $userFolder->search(new SearchQuery(new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'systemtag', $tag->getName()), 0, 0, [], $user)); - $tagCounts[$tag->getName()] = count($search); - } - $this->tagCountsCache->set($key, $tagCounts, 60 * 60 * 24 * 7); // 7 days - } - $this->initialState->provideInitialState('tag-counts', $tagCounts); - Util::addScript(Application::APP_ID, 'photos-main'); if ($this->appManager->isEnabledForUser('recognize') === true) { diff --git a/src/components/TagCover.vue b/src/components/TagCover.vue index 1be0c2b06..ebaa32159 100644 --- a/src/components/TagCover.vue +++ b/src/components/TagCover.vue @@ -74,7 +74,6 @@ export default { return { loadCover: false, observer: null, - tagCounts: loadState('photos', 'tag-counts'), } }, diff --git a/src/views/Tags.vue b/src/views/Tags.vue index 62bbf80d6..7d46ac742 100644 --- a/src/views/Tags.vue +++ b/src/views/Tags.vue @@ -70,7 +70,6 @@ export default { error: null, loading: false, showTags: false, - tagCounts: loadState('photos', 'tag-counts'), } },