aboutsummaryrefslogtreecommitdiff
path: root/src/components/status
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/status')
-rw-r--r--src/components/status/status.js25
-rw-r--r--src/components/status/status.vue2
2 files changed, 20 insertions, 7 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) ||
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index 0edc7b71..4541c560 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -106,7 +106,7 @@
</div>
<div class="container" v-if="replying">
<div class="reply-left"/>
- <post-status-form class="reply-body" :reply-to="status.id" :attentions="status.attentions" :repliedUser="status.user" :message-scope="status.visibility" :subject="replySubject" v-on:posted="toggleReplying"/>
+ <post-status-form class="reply-body" :reply-to="status.id" :attentions="status.attentions" :repliedUser="status.user" :copy-message-scope="status.visibility" :subject="replySubject" v-on:posted="toggleReplying"/>
</div>
</template>
</div>