From 4641f35baebd618ec51fa549adf64670c31c647f Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Thu, 27 Feb 2020 17:42:24 +0100 Subject: viewer: added a count of results found in other folders when no-results are found --- viewer/src/services/indexsearch.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'viewer/src/services/indexsearch.ts') diff --git a/viewer/src/services/indexsearch.ts b/viewer/src/services/indexsearch.ts index 3e73fb1..cd3383a 100644 --- a/viewer/src/services/indexsearch.ts +++ b/viewer/src/services/indexsearch.ts @@ -22,12 +22,11 @@ import { Operation } from '@/@types/Operation'; export default class IndexSearch { // Results of the search (by tags) - public static search(searchTags: Tag.Search[], rootPath: string): Gallery.Item[] { + public static search(searchTags: Tag.Search[]): Gallery.Item[] { const byOperation = this.extractTagsByOperation(searchTags); const intersection = this.extractIntersection(byOperation); const substraction = this.extractSubstraction(byOperation); - return this.aggregateAll(byOperation, intersection, substraction) - .filter(item => item.path.startsWith(rootPath)); + return this.aggregateAll(byOperation, intersection, substraction); } private static extractTagsByOperation(searchTags: Tag.Search[]): Tag.SearchByOperation { -- cgit v1.2.3