aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/services/indexfactory.ts
diff options
context:
space:
mode:
authorZero~Informatique2020-05-22 04:14:48 +0200
committerOzoneGrif2020-05-22 04:39:18 +0200
commit74c1c5e34787ac57299c8cbd874e9dcc56da406d (patch)
tree51da8090667290bc27e3580b9a78271ddf4d0e3a /viewer/src/services/indexfactory.ts
parente20f99b74b55fdb3edbcfe5bfdb700fc1a5e9574 (diff)
downloadldgallery-74c1c5e34787ac57299c8cbd874e9dcc56da406d.tar.gz
viewer: Enumerated item types
Diffstat (limited to 'viewer/src/services/indexfactory.ts')
-rw-r--r--viewer/src/services/indexfactory.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/viewer/src/services/indexfactory.ts b/viewer/src/services/indexfactory.ts
index e402185..00abc05 100644
--- a/viewer/src/services/indexfactory.ts
+++ b/viewer/src/services/indexfactory.ts
@@ -18,6 +18,7 @@
18*/ 18*/
19 19
20import { Operation } from "@/@types/Operation"; 20import { Operation } from "@/@types/Operation";
21import { ItemType } from "@/@types/ItemType";
21import Navigation from "@/services/navigation"; 22import Navigation from "@/services/navigation";
22 23
23export default class IndexFactory { 24export default class IndexFactory {
@@ -30,7 +31,7 @@ export default class IndexFactory {
30 31
31 // Pushes all tags for a root item (and its children) to the index 32 // Pushes all tags for a root item (and its children) to the index
32 private static pushTagsForItem(tagsIndex: Tag.Index, item: Gallery.Item): void { 33 private static pushTagsForItem(tagsIndex: Tag.Index, item: Gallery.Item): void {
33 if (item.properties.type === "directory") { 34 if (item.properties.type === ItemType.DIRECTORY) {
34 item.properties.items.forEach(item => this.pushTagsForItem(tagsIndex, item)); 35 item.properties.items.forEach(item => this.pushTagsForItem(tagsIndex, item));
35 return; // Directories are not indexed 36 return; // Directories are not indexed
36 } 37 }