Describe the bug
daemon.ReloadConfig reinitialises providers but does not stop IDLE watchers for accounts that were removed or had credentials changed. The old IDLE goroutine keeps running with a now-invalid *config.Account pointer; new mail events are tagged with a deleted account ID and the UI shows ghost notifications.
Expected behavior
On reload: diff the old vs new account set. For removed accounts, idleWatcher.Stop(accountID). For changed credentials, restart the watcher with the new account.
Why it's hard
The race window between "new providers created" and "old watchers torn down" needs to be handled without dropping new events. A clean fix probably introduces an explicit reload-token sequence.
Describe the bug
daemon.ReloadConfigreinitialises providers but does not stop IDLE watchers for accounts that were removed or had credentials changed. The old IDLE goroutine keeps running with a now-invalid*config.Accountpointer; new mail events are tagged with a deleted account ID and the UI shows ghost notifications.Expected behavior
On reload: diff the old vs new account set. For removed accounts,
idleWatcher.Stop(accountID). For changed credentials, restart the watcher with the new account.Why it's hard
The race window between "new providers created" and "old watchers torn down" needs to be handled without dropping new events. A clean fix probably introduces an explicit reload-token sequence.