logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe
commit: 256aa25a11bbccd2af4f9efa55a6f3155377ab38
parent: a7c6007d54d5e4f083a9bc8475d4041e78a3c2bf
Author: kaniini <nenolod@gmail.com>
Date:   Sun, 26 Aug 2018 01:22:13 +0000

Merge branch 'reply-preserve-subject' into 'develop'

Preserve subject in replies.

See merge request pleroma/pleroma-fe!318

Diffstat:

Msrc/components/post_status_form/post_status_form.js4+++-
Msrc/components/status/status.js6++++++
Msrc/components/status/status.vue2+-
3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js @@ -24,7 +24,8 @@ const PostStatusForm = { 'replyTo', 'repliedUser', 'attentions', - 'messageScope' + 'messageScope', + 'subject' ], components: { MediaUpload @@ -52,6 +53,7 @@ const PostStatusForm = { posting: false, highlighted: 0, newStatus: { + spoilerText: this.subject, status: statusText, nsfw: false, files: [], diff --git a/src/components/status/status.js b/src/components/status/status.js @@ -173,6 +173,12 @@ const Status = { } return true }, + replySubject () { + if (this.status.summary && !this.status.summary.match(/^re[: ]/i)) { + return 're: '.concat(this.status.summary) + } + return this.status.summary + }, attachmentSize () { if ((this.$store.state.config.hideAttachments && !this.inConversation) || (this.$store.state.config.hideAttachmentsInConv && this.inConversation)) { diff --git a/src/components/status/status.vue b/src/components/status/status.vue @@ -102,7 +102,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" v-on:posted="toggleReplying"/> + <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"/> </div> </template> </div>