Mailspring shows email search results from removed account

Description

I have synced an account (protonmail) in Mailspring, which I removed later because the functionality for Protonmail is not working correct yet. Not that the account has been removed, the search functionality still shows emails from that account. When I click it, an error occurs.

To Reproduce…

Steps to reproduce the behavior:

  1. Add & Sync a new account (protonmail if possible)
  2. Verify you can find emails from this account using the search functionality
  3. Remove the account in the account settings
  4. Verify the search functionality still shows results from the removed account
  5. Verify an error (mailspring is unable to sync undefined) when you click one of these emails
  6. Verify these search result are not removed from the system (two weeks after having removed the account, the results are still shown)

Expected Behavior

When the account has been deleted, all the mail information is removed and the search indexes are updated not to show results from the account anymore.

Screenshots

Setup

  • OS and Version: Pop!_OS 20.10
    • Installation Method: snap
  • Mailspring Version: 1.8.0