fix: remove now unneeded tags-count initial state

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2023-05-12 11:14:34 +02:00
parent 49bc8faced
commit a1a5cc15fb
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
3 changed files with 0 additions and 16 deletions

View File

@ -149,20 +149,6 @@ class PageController extends Controller {
$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) {

View File

@ -74,7 +74,6 @@ export default {
return {
loadCover: false,
observer: null,
tagCounts: loadState('photos', 'tag-counts'),
}
},

View File

@ -70,7 +70,6 @@ export default {
error: null,
loading: false,
showTags: false,
tagCounts: loadState('photos', 'tag-counts'),
}
},