Skip to content

fix: report the real trash count in manage_trash - #108

Merged
patrickfreyer merged 1 commit into
patrickfreyer:mainfrom
herbeckrobin:fix/trash-counts
Oct 15, 2026
Merged

patrickfreyer merged 1 commit into
patrickfreyer:mainfrom
herbeckrobin:fix/trash-counts

Conversation

@herbeckrobin

Copy link
Copy Markdown
Contributor

Split out of #98. manage_trash reported how many messages it tried to move, not how many actually landed in Trash. It now reports the real count. Test included.

@patrickfreyer

Copy link
Copy Markdown
Owner

This review was written by Claude (AI assistant) on Patrick's behalf.

Thanks @herbeckrobin, measuring Trash before and after makes the report honest whatever Mail does, 127 tests pass. Two small things alongside the CHANGELOG rebase:

  • manage.py:671-675: trashMessages is a list captured up front, so deleting doesn't shift its indices. The backwards loop is harmless, but the comment's reason doesn't hold, and with max_deletes it now picks the last N instead of the first N. Could you keep the forward order, or reword the comment?
  • manage.py:657 still says empty_trash "permanently deletes ALL messages", which contradicts the new docstring at :630. Maybe "attempts to delete".

@patrickfreyer
patrickfreyer merged commit 27272c5 into patrickfreyer:main Oct 15, 2026
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.

2 participants