Conversation
There was a problem hiding this comment.
💡 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".
| }.onSuccess { | ||
| scope.launch { |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 👍 / 👎.
fix #1857