forked from AkkomaGang/akkoma-fe
Merge pull request 'Add replying info for redraft' (#332) from xarvos/pleroma-fe:fix-reply-redraft into develop
Reviewed-on: AkkomaGang/akkoma-fe#332
This commit is contained in:
commit
2b05a738c9
1 changed files with 20 additions and 12 deletions
|
@ -136,18 +136,26 @@ const ExtraButtons = {
|
|||
},
|
||||
doRedraftStatus () {
|
||||
this.$store.dispatch('fetchStatusSource', { id: this.status.id })
|
||||
.then(data => this.$store.dispatch('openPostStatusModal', {
|
||||
isRedraft: true,
|
||||
statusId: this.status.id,
|
||||
subject: data.spoiler_text,
|
||||
statusText: data.text,
|
||||
statusIsSensitive: this.status.nsfw,
|
||||
statusPoll: this.status.poll,
|
||||
statusFiles: [...this.status.attachments],
|
||||
statusScope: this.status.visibility,
|
||||
statusLanguage: this.status.language,
|
||||
statusContentType: data.content_type
|
||||
}))
|
||||
.then(data => {
|
||||
let repliedUserId = this.status.in_reply_to_user_id;
|
||||
let repliedUser = this.status.attentions.filter(user =>
|
||||
user.id === repliedUserId);
|
||||
this.$store.dispatch('openPostStatusModal', {
|
||||
isRedraft: true,
|
||||
attentions: this.status.attentions,
|
||||
statusId: this.status.id,
|
||||
subject: data.spoiler_text,
|
||||
statusText: data.text,
|
||||
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()
|
||||
},
|
||||
showRedraftStatusConfirmDialog () {
|
||||
|
|
Loading…
Reference in a new issue