diff --git a/src/components/draft/draft.js b/src/components/draft/draft.js index f5f44467..ffc3671a 100644 --- a/src/components/draft/draft.js +++ b/src/components/draft/draft.js @@ -58,10 +58,6 @@ const Draft = { }, hideConfirmDialog () { this.showingConfirmDialog = false - }, - handlePosted () { - console.debug('posted') - this.doAbandon() } } } diff --git a/src/components/draft/draft.vue b/src/components/draft/draft.vue index 43b14721..cc385c14 100644 --- a/src/components/draft/draft.vue +++ b/src/components/draft/draft.vue @@ -48,12 +48,10 @@ diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 7b6bc293..49395947 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -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])