Fixed the alt manager's incidental limit of 3 Microsoft accounts.
Type of change
- [x] Bug fix
- [ ] New feature
Description
This pr fixes the alt manager's incidental limit of 3 Microsoft accounts, which was occurring due to an API ratelimit during the process of loading accounts from disk. I accomplished this by moving usage of the fetchInfo() method out of Accounts#fromTag and relocating it to instead run when an account is actually logged into.
This prevents accounts beyond the 3rd from being thanos-snapped off the account list due to ratelimits on startup. You can still be ratelimited if you're switching between accounts too quickly, but if this happens just be patient, wait 30 seconds, try again and it will work.
Related issues
Closes https://github.com/MeteorDevelopment/meteor-client/issues/4054
How Has This Been Tested?
This was tested by adding more than 3 Microsoft accounts to the alt manager, closing and reopening the client, and then logging into and joining a server with each account in turn, to ensure the feature was working as expected. As a result of these changes, the alt manager can now support more than 3 accounts, which successfully persist through restarts.
Checklist:
- [x] My code follows the style guidelines of this project.
- [x] I have added comments to my code in more complex areas.
- [x] I have tested the code in both development and production environments.
Got it, I'll take another crack at it when I get some time.
How does this look? I tested with Microsoft accounts and the slow login speeds and ratelimit issues seem to be fixed. However, I did not test with any altening accounts.