diff options
| author | Henry Jameson <me@hjkos.com> | 2018-11-26 05:21:58 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2018-11-26 05:21:58 +0300 |
| commit | a806d43f05ddded69a00156bc31fe33806426ecb (patch) | |
| tree | afa9a3f43043bbce92739fb48d048605e0c45c2b /src/components/status/status.js | |
| parent | 08838774e41b9beba8f884da15ab1314eddf28f8 (diff) | |
| parent | 91272dc5558e1326dac872f927dc8da7f9109cd0 (diff) | |
Merge remote-tracking branch 'upstream/develop' into feature/theming2
* upstream/develop: (60 commits)
whoops
whoops
DM timeline: stream new statuses
update-japanese-translation
Add actual user search.
incorporate most translation changes from MR 368
update french translation
Always show dm panel.
Add direct message tab.
api service url
remove deploy stage
remove deploy stage
updated and completed German translation
On logout switch to public timeline.
minor modification of Chinese translation
update Chinese translation
Add Chinese language
Fix posting.
Put oauth text into description.
Display OAuth login on login form button.
...
Diffstat (limited to 'src/components/status/status.js')
| -rw-r--r-- | src/components/status/status.js | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js index 45f5ccac..10716583 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -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,16 +175,22 @@ 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 }, replySubject () { - if (this.status.summary && !this.status.summary.match(/^re[: ]/i)) { + if (!this.status.summary) return '' + const behavior = this.$store.state.config.subjectLineBehavior + const startsWithRe = this.status.summary.match(/^re[: ]/i) + if (behavior !== 'noop' && startsWithRe || behavior === 'masto') { + return this.status.summary + } else if (behavior === 'email') { return 're: '.concat(this.status.summary) + } else if (behavior === 'noop') { + return '' } - return this.status.summary }, attachmentSize () { if ((this.$store.state.config.hideAttachments && !this.inConversation) || |
