From 7b4e08dd93520e3dc1113d76e097b998d12b0f3c Mon Sep 17 00:00:00 2001
From: ValD <maghtpol@gmail.com>
Date: Wed, 12 Dec 2018 03:33:53 +0530
Subject: added config for preload and made attachment responsive to it

---
 src/components/attachment/attachment.vue | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'src/components/attachment/attachment.vue')

diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue
index 6c8a04ed..1b1956e0 100644
--- a/src/components/attachment/attachment.vue
+++ b/src/components/attachment/attachment.vue
@@ -9,8 +9,7 @@
     <div class="hider" v-if="nsfw && hideNsfwLocal && !hidden">
       <a href="#" @click.prevent="toggleHidden()">Hide</a>
     </div>
-
-    <a v-if="type === 'image'" class="image-attachment" :class="{'hidden': hidden}" :href="attachment.url" target="_blank" :title="attachment.description">
+    <a v-if="type === 'image' && (!hidden || preloadNsfwImage)" class="image-attachment" :class="{'hidden': hidden && preloadNsfwImage}" :href="attachment.url" target="_blank" :title="attachment.description">
       <StillImage :class="{'small': isSmall}" referrerpolicy="no-referrer" :mimetype="attachment.mimetype" :src="attachment.large_thumb_url || attachment.url"/>
     </a>
 
-- 
cgit v1.2.3-70-g09d2

