Skip to content

add draft box logic#1860

Draft
Tlaster wants to merge 3 commits intomasterfrom
feature/draft
Draft

add draft box logic#1860
Tlaster wants to merge 3 commits intomasterfrom
feature/draft

Conversation

@Tlaster
Copy link
Contributor

@Tlaster Tlaster commented Mar 10, 2026

fix #1857

@Tlaster Tlaster marked this pull request as draft March 10, 2026 05:55
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5892faaf2a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 61 to 62
}.onSuccess {
scope.launch {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Stop emitting success after send failures

sendDraftUseCase reports per-account failures via ComposeProgressState.Error and returns normally, so this unconditional onSuccess branch still emits ComposeProgressState.Success afterward. In multi-account sends where one or more accounts fail, the UI gets an error and then a success signal for the same action, which can incorrectly show a successful compose notification/state despite failed deliveries.

Useful? React with 👍 / 👎.

}
progressTracker.onComposeSuccess(target.account.accountKey)
progress(progressTracker.state())
draftRepository.deleteTarget(groupId, target.account.accountKey)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clean up cached media after successful draft send

After a target succeeds, only the DB target row is removed here; no path calls DraftMediaStore.delete when the final target for a group succeeds. That leaves files under draft_media/<groupId>/... orphaned after every successful post with attachments, so local storage usage grows over time with no references left in the database.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request / X]It seems that there is no “Drafts” function to manage unsent and scheduled posts in X?

1 participant