Add replying info for redraft #332
1 changed files with 20 additions and 12 deletions
|
@ -136,18 +136,26 @@ const ExtraButtons = {
|
||||||
},
|
},
|
||||||
doRedraftStatus () {
|
doRedraftStatus () {
|
||||||
this.$store.dispatch('fetchStatusSource', { id: this.status.id })
|
this.$store.dispatch('fetchStatusSource', { id: this.status.id })
|
||||||
.then(data => this.$store.dispatch('openPostStatusModal', {
|
.then(data => {
|
||||||
isRedraft: true,
|
let repliedUserId = this.status.in_reply_to_user_id;
|
||||||
statusId: this.status.id,
|
let repliedUser = this.status.attentions.filter(user =>
|
||||||
subject: data.spoiler_text,
|
user.id === repliedUserId);
|
||||||
statusText: data.text,
|
this.$store.dispatch('openPostStatusModal', {
|
||||||
statusIsSensitive: this.status.nsfw,
|
isRedraft: true,
|
||||||
statusPoll: this.status.poll,
|
attentions: this.status.attentions,
|
||||||
statusFiles: [...this.status.attachments],
|
statusId: this.status.id,
|
||||||
statusScope: this.status.visibility,
|
subject: data.spoiler_text,
|
||||||
statusLanguage: this.status.language,
|
statusText: data.text,
|
||||||
statusContentType: data.content_type
|
statusIsSensitive: this.status.nsfw,
|
||||||
}))
|
statusPoll: this.status.poll,
|
||||||
|
statusFiles: [...this.status.attachments],
|
||||||
|
statusScope: this.status.visibility,
|
||||||
|
statusLanguage: this.status.language,
|
||||||
|
statusContentType: data.content_type,
|
||||||
|
replyTo: this.status.in_reply_to_status_id,
|
||||||
|
repliedUser: repliedUser
|
||||||
|
})
|
||||||
|
})
|
||||||
this.doDeleteStatus()
|
this.doDeleteStatus()
|
||||||
},
|
},
|
||||||
showRedraftStatusConfirmDialog () {
|
showRedraftStatusConfirmDialog () {
|
||||||
|
|
Loading…
Reference in a new issue