diff --git a/src/renderer/components/organisms/Notification/Favourite.vue b/src/renderer/components/organisms/Notification/Favourite.vue index c9e8a009..a3cd12c8 100644 --- a/src/renderer/components/organisms/Notification/Favourite.vue +++ b/src/renderer/components/organisms/Notification/Favourite.vue @@ -153,10 +153,11 @@ export default { } }, computed: { - ...mapState({ - displayNameStyle: state => state.App.displayNameStyle, - timeFormat: state => state.App.timeFormat, - language: state => state.App.language + ...mapState('App', { + displayNameStyle: state => state.displayNameStyle, + timeFormat: state => state.timeFormat, + language: state => state.language, + hideAllAttachments: state => state.hideAllAttachments }), shortcutEnabled: function () { return this.focused && !this.overlaid @@ -251,7 +252,7 @@ export default { return !this.spoilered(message) || this.showContent }, sensitive(message) { - return message.sensitive && this.mediaAttachments(message).length > 0 + return (this.hideAllAttachments || message.sensitive) && this.mediaAttachments(message).length > 0 }, isShowAttachments(message) { return !this.sensitive(message) || this.showAttachments diff --git a/src/renderer/components/organisms/Notification/PollExpired.vue b/src/renderer/components/organisms/Notification/PollExpired.vue index 29dce8e7..3c78fa84 100644 --- a/src/renderer/components/organisms/Notification/PollExpired.vue +++ b/src/renderer/components/organisms/Notification/PollExpired.vue @@ -153,10 +153,11 @@ export default { } }, computed: { - ...mapState({ - displayNameStyle: state => state.App.displayNameStyle, - timeFormat: state => state.App.timeFormat, - language: state => state.App.language + ...mapState('App', { + displayNameStyle: state => state.displayNameStyle, + timeFormat: state => state.timeFormat, + language: state => state.language, + hideAllAttachments: state => state.hideAllAttachments }), shortcutEnabled: function () { return this.focused && !this.overlaid @@ -251,7 +252,7 @@ export default { return !this.spoilered(message) || this.showContent }, sensitive(message) { - return message.sensitive && this.mediaAttachments(message).length > 0 + return (this.hideAllAttachments || message.sensitive) && this.mediaAttachments(message).length > 0 }, isShowAttachments(message) { return !this.sensitive(message) || this.showAttachments diff --git a/src/renderer/components/organisms/Notification/PollVote.vue b/src/renderer/components/organisms/Notification/PollVote.vue index 181831e3..93402e4b 100644 --- a/src/renderer/components/organisms/Notification/PollVote.vue +++ b/src/renderer/components/organisms/Notification/PollVote.vue @@ -153,10 +153,11 @@ export default { } }, computed: { - ...mapState({ - displayNameStyle: state => state.App.displayNameStyle, - timeFormat: state => state.App.timeFormat, - language: state => state.App.language + ...mapState('App', { + displayNameStyle: state => state.displayNameStyle, + timeFormat: state => state.timeFormat, + language: state => state.language, + hideAllAttachments: state => state.hideAllAttachments }), shortcutEnabled: function () { return this.focused && !this.overlaid @@ -251,7 +252,7 @@ export default { return !this.spoilered(message) || this.showContent }, sensitive(message) { - return message.sensitive && this.mediaAttachments(message).length > 0 + return (this.hideAllAttachments || message.sensitive) && this.mediaAttachments(message).length > 0 }, isShowAttachments(message) { return !this.sensitive(message) || this.showAttachments diff --git a/src/renderer/components/organisms/Notification/Quote.vue b/src/renderer/components/organisms/Notification/Quote.vue index faef62d6..1dee6a3c 100644 --- a/src/renderer/components/organisms/Notification/Quote.vue +++ b/src/renderer/components/organisms/Notification/Quote.vue @@ -165,9 +165,10 @@ export default { } }, computed: { - ...mapState({ - timeFormat: state => state.App.timeFormat, - language: state => state.App.language + ...mapState('App', { + timeFormat: state => state.timeFormat, + language: state => state.language, + hideAllAttachments: state => state.hideAllAttachments }), shortcutEnabled: function () { return this.focused && !this.overlaid @@ -261,7 +262,7 @@ export default { return !this.spoilered(message) || this.showContent }, sensitive(message) { - return message.sensitive && this.mediaAttachments(message).length > 0 + return (this.hideAllAttachments || message.sensitive) && this.mediaAttachments(message).length > 0 }, isShowAttachments(message) { return !this.sensitive(message) || this.showAttachments diff --git a/src/renderer/components/organisms/Notification/Reaction.vue b/src/renderer/components/organisms/Notification/Reaction.vue index 900abb8f..696a9585 100644 --- a/src/renderer/components/organisms/Notification/Reaction.vue +++ b/src/renderer/components/organisms/Notification/Reaction.vue @@ -153,10 +153,11 @@ export default { } }, computed: { - ...mapState({ - displayNameStyle: state => state.App.displayNameStyle, - timeFormat: state => state.App.timeFormat, - language: state => state.App.language + ...mapState('App', { + displayNameStyle: state => state.displayNameStyle, + timeFormat: state => state.timeFormat, + language: state => state.language, + hideAllAttachments: state => state.hideAllAttachments }), shortcutEnabled: function () { return this.focused && !this.overlaid @@ -251,7 +252,7 @@ export default { return !this.spoilered(message) || this.showContent }, sensitive(message) { - return message.sensitive && this.mediaAttachments(message).length > 0 + return (this.hideAllAttachments || message.sensitive) && this.mediaAttachments(message).length > 0 }, isShowAttachments(message) { return !this.sensitive(message) || this.showAttachments diff --git a/src/renderer/components/organisms/Notification/Reblog.vue b/src/renderer/components/organisms/Notification/Reblog.vue index f3655932..f123c8fe 100644 --- a/src/renderer/components/organisms/Notification/Reblog.vue +++ b/src/renderer/components/organisms/Notification/Reblog.vue @@ -155,9 +155,10 @@ export default { } }, computed: { - ...mapState({ - timeFormat: state => state.App.timeFormat, - language: state => state.App.language + ...mapState('App', { + timeFormat: state => state.timeFormat, + language: state => state.language, + hideAllAttachments: state => state.hideAllAttachments }), shortcutEnabled: function () { return this.focused && !this.overlaid @@ -251,7 +252,7 @@ export default { return !this.spoilered(message) || this.showContent }, sensitive(message) { - return message.sensitive && this.mediaAttachments(message).length > 0 + return (this.hideAllAttachments || message.sensitive) && this.mediaAttachments(message).length > 0 }, isShowAttachments(message) { return !this.sensitive(message) || this.showAttachments