feat(desktop): advance preview window to next email on delete #85

Closed
clanker wants to merge 1 commit from pr/preview-advance-on-delete into main
Member

Keep the preview pane open and advance to the next email when deleting or archiving an active thread.

Changes

  • When SearchPanel.update_thread or refresh removes an active thread from the search list, it opens the next selected thread immediately and stops any pending auto-open timer.
  • Added focus parameter to open_thread and open_current_thread so auto-open operations preserve list focus during keyboard navigation.
  • If the deleted email is the last email in the list, the preview pane closes.
  • If the preview pane was closed, it stays closed.
  • If ThreadPanel hits EmptyThreadError on refresh, it checks the active search panel and advances to the selected thread before falling back to closing.

Test steps

  1. Open Lazarus with multiple emails in the inbox.
  2. Select and open an email so the preview pane shows its content.
  3. Press d to trash the email.
  4. Verify the preview pane stays open and immediately displays the next email in the list.
  5. Trash the final remaining email in the list.
  6. Verify the preview pane closes when the list becomes empty.
  7. Run pytest tests/test_preview_advance.py.
Keep the preview pane open and advance to the next email when deleting or archiving an active thread. ### Changes - When SearchPanel.update_thread or refresh removes an active thread from the search list, it opens the next selected thread immediately and stops any pending auto-open timer. - Added focus parameter to open_thread and open_current_thread so auto-open operations preserve list focus during keyboard navigation. - If the deleted email is the last email in the list, the preview pane closes. - If the preview pane was closed, it stays closed. - If ThreadPanel hits EmptyThreadError on refresh, it checks the active search panel and advances to the selected thread before falling back to closing. ### Test steps 1. Open Lazarus with multiple emails in the inbox. 2. Select and open an email so the preview pane shows its content. 3. Press d to trash the email. 4. Verify the preview pane stays open and immediately displays the next email in the list. 5. Trash the final remaining email in the list. 6. Verify the preview pane closes when the list becomes empty. 7. Run pytest tests/test_preview_advance.py.
clanker closed this pull request 2026-09-12 01:35:26 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Home/lazarus!85
No description provided.