fix(maillist): Ensure we only switch to index data after its loaded #1625
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Only switch to index data after its actually loaded, don't accidentally switch back to the API messagelist., or redo folder counts until user actions are finished.
Also fix an issue where switching from non-folders (Compose/Drafts/Overview) to a folder (by clicking on the Folder name), would display the contents of Inbox, regardless of which folder was selected.
Seems the issue was childRouteActivated - runs when the non-folder router outlet (aka compose, drafts et al) deactivates, and was setting selectedFolder to Inbox, generally after switchToFolder et al had switched the folder (so we switched it to chosen folder, then back to Inbox after the deactivation)
Fixes: #1622
Fixes: #1564