From 7f0b8367a2092c5ffd69e9e46d055cbd605c0e3a Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Fri, 28 Feb 2020 18:50:12 +0100
Subject: viewer: more minor architectural and performance improvement

---
 viewer/src/views/PanelLeft.vue | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index 5b3196a..9e9a600 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -70,11 +70,7 @@ export default class PanelLeft extends Vue {
   @Watch("$route")
   restoreSearchFilters(route: Route) {
     const query = Object.keys(route.query);
-    if (query.length > 0) {
-      const tagsIndex = this.$galleryStore.tagsIndex;
-      this.searchFilters = Object.keys(route.query).flatMap(filter => IndexFactory.searchTags(tagsIndex, filter, true));
-      this.$galleryStore.setCurrentSearch([...this.searchFilters]);
-    }
+    if (query.length > 0) this.$galleryStore.search(query).then(search => (this.searchFilters = [...search]));
   }
 }
 </script>
-- 
cgit v1.2.3

