refs #2856 Hide medias in notifications when the setting is enabled

This commit is contained in:
AkiraFukushima 2021-12-30 00:42:55 +09:00
parent 6b250666fa
commit 782684537e
No known key found for this signature in database
GPG Key ID: B6E51BAC4DE1A957
6 changed files with 34 additions and 28 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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