Merge branch 'instance-setting-fallback' into 'develop'

Fall back to instance settings consistently

See merge request pleroma/pleroma-fe!361
This commit is contained in:
Henry 2018-10-21 21:01:22 +00:00
commit 48d6483700
2 changed files with 12 additions and 5 deletions

View File

@ -31,10 +31,17 @@ const Status = {
preview: null,
showPreview: false,
showingTall: false,
expandingSubject: !this.$store.state.config.collapseMessageWithSubject
expandingSubject: typeof this.$store.state.config.collapseMessageWithSubject === 'undefined'
? !this.$store.state.instance.collapseMessageWithSubject
: !this.$store.state.config.collapseMessageWithSubject
}
},
computed: {
localCollapseSubjectDefault () {
return typeof this.$store.state.config.collapseMessageWithSubject === 'undefined'
? this.$store.state.instance.collapseMessageWithSubject
: this.$store.state.config.collapseMessageWithSubject
},
muteWords () {
return this.$store.state.config.muteWords
},
@ -147,13 +154,13 @@ const Status = {
return this.status.attentions.length > 0
},
hideSubjectStatus () {
if (this.tallStatus && !this.$store.state.config.collapseMessageWithSubject) {
if (this.tallStatus && !this.localCollapseSubjectDefault) {
return false
}
return !this.expandingSubject && this.status.summary
},
hideTallStatus () {
if (this.status.summary && this.$store.state.config.collapseMessageWithSubject) {
if (this.status.summary && this.localCollapseSubjectDefault) {
return false
}
if (this.showingTall) {
@ -168,7 +175,7 @@ const Status = {
if (!this.status.nsfw) {
return false
}
if (this.status.summary && this.$store.state.config.collapseMessageWithSubject) {
if (this.status.summary && this.localCollapseSubjectDefault) {
return false
}
return true

View File

@ -5,7 +5,7 @@ const browserLocale = (window.navigator.language || 'en').split('-')[0]
const defaultState = {
colors: {},
collapseMessageWithSubject: false,
collapseMessageWithSubject: undefined,
hideAttachments: false,
hideAttachmentsInConv: false,
hideNsfw: true,