Abandon draft after all postings

This commit is contained in:
tusooa 2023-03-10 19:28:08 -05:00
parent 8d27c68d5f
commit 050266ee39
No known key found for this signature in database
GPG Key ID: 42AEC43D48433C51
3 changed files with 4 additions and 6 deletions

View File

@ -58,10 +58,6 @@ const Draft = {
},
hideConfirmDialog () {
this.showingConfirmDialog = false
},
handlePosted () {
console.debug('posted')
this.doAbandon()
}
}
}

View File

@ -48,12 +48,10 @@
<PostStatusForm
v-if="draft.type !== 'edit'"
v-bind="postStatusFormProps"
@posted="handlePosted"
/>
<EditStatusForm
v-else
:params="postStatusFormProps"
@posted="handlePosted"
/>
</div>
<teleport to="#modal">

View File

@ -385,6 +385,7 @@ const PostStatusForm = {
postHandler(postingOptions).then((data) => {
if (!data.error) {
this.abandonDraft()
this.clearStatus()
this.$emit('posted', data)
} else {
@ -673,6 +674,9 @@ const PostStatusForm = {
})
}
},
abandonDraft () {
this.$store.dispatch('abandonDraft', { id: this.newStatus.id })
},
getDraft (statusType, refId) {
console.debug('type and ref:', [statusType, refId])