diff --git a/src/components/chat_message/chat_message.js b/src/components/chat_message/chat_message.js index acc1ff31d..88ce38953 100644 --- a/src/components/chat_message/chat_message.js +++ b/src/components/chat_message/chat_message.js @@ -76,9 +76,7 @@ const ChatMessage = { return !!this.message.user }, author() { - const accountId = this.isStatus - ? this.message.user.id - : this.message.account_id + const accountId = this.isStatus ? this.message.user.id : this.message.account_id return this.$store.getters.findUser(accountId) }, diff --git a/src/components/draft/draft.vue b/src/components/draft/draft.vue index e610f627b..c91675e35 100644 --- a/src/components/draft/draft.vue +++ b/src/components/draft/draft.vue @@ -51,7 +51,7 @@ @pause="$emit('mediapause', attachment.id)" />
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 11aac3c1b..a34e9a3ec 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -266,9 +266,9 @@ const PostStatusForm = { mentionsString() { if (this.statusType !== 'reply' && this.statusType !== 'mention') return '' - let allAttentions = [...(this.newStatus.mentions || [])] + let allAttentions = [...(this.attentions || [])] - if (this.repliedUser) allAttentions.unshift(this.repliedUser) + allAttentions.unshift(this.repliedUser) allAttentions = uniqBy(allAttentions, 'id') allAttentions = reject(allAttentions, { id: this.currentUser.id }) @@ -303,11 +303,12 @@ const PostStatusForm = { if (this.mentionsLine) { defaultNewStatus.status = statusText + defaultNewStatus.mentions = this.mentionsString.trim() } else { defaultNewStatus.status = this.mentionsString + statusText + defaultNewStatus.mentions = '' } - defaultNewStatus.mentions = this.attentions defaultNewStatus.spoilerText = this.repliedSubjectString ?? '' defaultNewStatus.nsfw = this.userDefaultSensitive defaultNewStatus.visibility = scope @@ -590,8 +591,7 @@ const PostStatusForm = { // Composing onMentionsLineUpdate(e) { if (this.mentionsLineReadOnly) return - // TODO - //this.newStatus.mentions = e + this.newStatus.mentionsLine = e }, changeVis(visibility) { this.newStatus.visibility = visibility @@ -599,13 +599,13 @@ const PostStatusForm = { clearStatus() { this.saveInhibited = true this.newStatus.status = '' - this.newStatus.mentions = null - this.newStatus.spoilerText = '' - this.newStatus.files = [] - this.newStatus.poll = null - this.newStatus.quote = null - this.newStatus.mediaDescriptions = {} - this.$refs.mediaUpload && this.$refs.mediaUpload.clearFile() + ;(this.newStatus.mentionsLine = ''), + (this.newStatus.spoilerText = ''), + (this.newStatus.files = []), + (this.newStatus.poll = null), + (this.newStatus.quote = null), + (this.newStatus.mediaDescriptions = {}), + this.$refs.mediaUpload && this.$refs.mediaUpload.clearFile() this.clearQuoteForm() if (this.preserveFocus) { this.$nextTick(() => {