aboutsummaryrefslogtreecommitdiff
path: root/src/components/attachment/attachment.js
diff options
context:
space:
mode:
authorHector A. Escobedo <ninjahector.escobedo@gmail.com>2017-02-22 18:59:48 -0500
committerHector A. Escobedo <ninjahector.escobedo@gmail.com>2017-02-22 19:31:49 -0500
commitc338940084d7311844d2dd5c11c92f95ab47f486 (patch)
tree0bb2014230fbf316ad46f913764ee46a89a942d6 /src/components/attachment/attachment.js
parenta7db72d7a7667fc5f06953b37d32d6847e6dfc58 (diff)
Fix syntax errors and hiding logic.
This has been tested.
Diffstat (limited to 'src/components/attachment/attachment.js')
-rw-r--r--src/components/attachment/attachment.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js
index 8e959903..f4f6aebf 100644
--- a/src/components/attachment/attachment.js
+++ b/src/components/attachment/attachment.js
@@ -7,17 +7,19 @@ const Attachment = {
'nsfw',
'statusId'
],
- data: () => ({
- nsfwImage,
- hideNsfwLocal: this.$store.state.config.hideNsfw,
- showHidden: !this.hideNsfwLocal
- }),
+ data () {
+ return {
+ nsfwImage,
+ hideNsfwLocal: this.$store.state.config.hideNsfw,
+ showHidden: false
+ }
+ },
computed: {
type () {
return fileTypeService.fileType(this.attachment.mimetype)
},
hidden () {
- return this.nsfw && !this.showHidden
+ return this.nsfw && this.hideNsfwLocal && !this.showHidden
}
},
methods: {