Fall back to instance settings consistently

This commit is contained in:
scarlett 2018-10-21 18:04:23 +01:00
parent 82cc37a55e
commit d6ad08050a
2 changed files with 11 additions and 5 deletions

View file

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

View file

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