Skip to content

Conversation

@rafaeltonholo
Copy link
Member

Fixes #8049.

This PR is meant to fix the issue where the Outbox gets removed from the database and inbox gets selected as also an outbox, causing the "IllegalStateException: No outbox_state entry for message with id " notification.

This solution focus on:

  • Remove the outboxFolderId reference from the preference store;
  • Query the folder's table for the outbox id whenever required, caching it to avoid hitting the database too often;
  • Ensure there will be one Outbox folder whenever we request the Outbox id. If there isn't a outbox, the app creates a new one on the fly;
  • Remove the reference from the outboxFolderId from the LegacyAccount and LegacyAccountDto.

@rafaeltonholo
Copy link
Member Author

I might squash some commits, the ones with message starting with "use OutboxFolderManager...", to keep it easier to revert in case of need.

wmontwe
wmontwe previously approved these changes Sep 29, 2025
Copy link
Member

@wmontwe wmontwe left a comment

Choose a reason for hiding this comment

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

Thank you for digging into this.

I just some little comments.

…n SpecialLocalFoldersCreator; migrate createSpecialLocalFolders to suspend function
@rafaeltonholo rafaeltonholo force-pushed the fix/8049/outbox-state-entry-not-found-enforce-outbox branch from 3e5a23b to 0b3ec8e Compare September 29, 2025 12:56
Copy link
Member

@wmontwe wmontwe left a comment

Choose a reason for hiding this comment

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

LGTM

@rafaeltonholo rafaeltonholo merged commit ccead4e into thunderbird:main Sep 29, 2025
13 checks passed
@rafaeltonholo rafaeltonholo deleted the fix/8049/outbox-state-entry-not-found-enforce-outbox branch September 29, 2025 14:24
@thunderbird-botmobile thunderbird-botmobile bot added this to the Thunderbird 14 milestone Sep 29, 2025
rafaeltonholo added a commit to rafaeltonholo/thunderbird-android that referenced this pull request Sep 29, 2025
…x-state-entry-not-found-enforce-outbox

refactor(outbox): enforce always one outbox folder per account and remove outboxFolderId from preferences
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.

Annoying notification in status bar keeps reappearing multiple times a day: IllegalStateException: No outbox_state entry for message with id 1218

2 participants