Skip to content

Commit

Permalink
fix: remove now unneeded tags-count initial state
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
  • Loading branch information
blizzz committed May 12, 2023
1 parent c0d499b commit ffddb90
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
14 changes: 0 additions & 14 deletions lib/Controller/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion src/components/TagCover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export default {
return {
loadCover: false,
observer: null,
tagCounts: loadState('photos', 'tag-counts'),
}
},
Expand Down
1 change: 0 additions & 1 deletion src/views/Tags.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export default {
error: null,
loading: false,
showTags: false,
tagCounts: loadState('photos', 'tag-counts'),
}
},
Expand Down

0 comments on commit ffddb90

Please sign in to comment.