add account switcher to loading screen

This commit is contained in:
MathMan05
2024-08-11 15:41:51 -05:00
parent 6ac1a4e904
commit ef2d228b70
6 changed files with 178 additions and 133 deletions

View File

@@ -39,7 +39,10 @@ class Localuser{
connectionSucceed=0;
errorBackoff=0;
mfa_enabled:boolean;
constructor(userinfo:Specialuser){
constructor(userinfo:Specialuser|-1){
if(userinfo===-1){
return;
}
this.token=userinfo.token;
this.userinfo=userinfo;
this.serverurls=this.userinfo.serverurls;
@@ -110,7 +113,9 @@ class Localuser{
this.outoffocus();
this.guilds=[];
this.guildids=new Map();
this.ws.close(4001)
if(this.ws){
this.ws.close(4001)
}
SnowFlake.clear();
User.clear();
}