logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://anongit.hacktivis.me/git/pleroma-fe.git/
commit: e67e5ff8992409dfc1d312da93e5e2d6b712663f
parent ba5cad90d891011dc0cf9068bc1614014f4520ec
Author: tusooa <tusooa@kazv.moe>
Date:   Fri, 10 Mar 2023 19:28:08 -0500

Abandon draft after all postings

Diffstat:

Msrc/components/draft/draft.js4----
Msrc/components/draft/draft.vue2--
Msrc/components/post_status_form/post_status_form.js4++++
3 files changed, 4 insertions(+), 6 deletions(-)

diff --git 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 @@ -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"> diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js @@ -418,6 +418,7 @@ const PostStatusForm = { postHandler(postingOptions).then((data) => { if (!data.error) { + this.abandonDraft() this.clearStatus() this.$emit('posted', data) } else { @@ -707,6 +708,9 @@ const PostStatusForm = { }) } }, + abandonDraft () { + this.$store.dispatch('abandonDraft', { id: this.newStatus.id }) + }, getDraft (statusType, refId) { console.debug('type and ref:', [statusType, refId])