From d25b5a87668bba43e81342f7385a1097653c5311 Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Fri, 10 Jan 2020 22:03:30 +0100
Subject: Code review code improvements

---
 viewer/src/views/Gallery.vue | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

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

diff --git a/viewer/src/views/Gallery.vue b/viewer/src/views/Gallery.vue
index a53df3d..1c98877 100644
--- a/viewer/src/views/Gallery.vue
+++ b/viewer/src/views/Gallery.vue
@@ -1,8 +1,8 @@
 <template>
   <div>
     <gallery-search v-if="$uiStore.isModeSearch" :items="currentSearch" />
-    <gallery-directory v-else-if="isDirectory" :directory="$galleryStore.currentItem" />
-    <gallery-picture v-else-if="isPicture" :picture="$galleryStore.currentItem" />
+    <gallery-directory v-else-if="checkType('directory')" :directory="$galleryStore.currentItem" />
+    <gallery-picture v-else-if="checkType('picture')" :picture="$galleryStore.currentItem" />
     <div v-else>{{$t("gallery.unknowntype")}}</div>
   </div>
 </template>
@@ -30,14 +30,6 @@ export default class Gallery extends Vue {
     this.$galleryStore.setCurrentPath(this.pathMatch);
   }
 
-  get isDirectory(): boolean {
-    return this.checkType("directory");
-  }
-
-  get isPicture(): boolean {
-    return this.checkType("picture");
-  }
-
   // Results of the search (by tags)
   get currentSearch(): Gallery.Item[] {
     const byOperation = this.extractTagsByOperation(this.$uiStore.currentTags);
-- 
cgit v1.2.3

