Sunday, 6 October 2019

Gmail API after deleting a draft, sidebar and counter not updated

I'm having an issue. After I open a new compose view top programtically delete the draft, i run the block below to discard the draft. Initially I thought that this was not working because when I would execute it, I could still see the item in the left sidebar & counter. However when I refresh the page, I can see the draft is indeed deleted. Thoughts?

private async discardDraft() {
    const draftId = await this.composeView.getCurrentDraftID();
    gmailService.discardDraft(draftId);
    this.composeView.close();
}

export async function discardDraft(draftId: string) {
    return request.delete(`/gmail/v1/users/me/drafts/${draftId}`).then(res => true);
}

enter image description here



from Gmail API after deleting a draft, sidebar and counter not updated

No comments:

Post a Comment