mirror of https://github.com/nextcloud/photos
fix: remove now unneeded tags-count initial state
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
49bc8faced
commit
a1a5cc15fb
|
@ -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) {
|
||||
|
|
|
@ -74,7 +74,6 @@ export default {
|
|||
return {
|
||||
loadCover: false,
|
||||
observer: null,
|
||||
tagCounts: loadState('photos', 'tag-counts'),
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -70,7 +70,6 @@ export default {
|
|||
error: null,
|
||||
loading: false,
|
||||
showTags: false,
|
||||
tagCounts: loadState('photos', 'tag-counts'),
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue