mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2024-11-24 12:25:39 +01:00
sort username in account list
This commit is contained in:
parent
104e36d36c
commit
a61bf718ab
@ -218,8 +218,8 @@ function addMcAccountToList(id, name, msUser = null) {
|
||||
}
|
||||
function refreshAccountList() {
|
||||
accounts.innerHTML = "";
|
||||
getMcAccounts().filter(isMojang).forEach(it => addMcAccountToList(it.id, it.name));
|
||||
(myMSALObj.getAllAccounts() || []).forEach(msAccount => {
|
||||
getMcAccounts().filter(isMojang).sort((a, b) => a.name.localeCompare(b.name)).forEach(it => addMcAccountToList(it.id, it.name));
|
||||
(myMSALObj.getAllAccounts() || []).sort((a, b) => a.username.localeCompare(b.username)).forEach(msAccount => {
|
||||
let mcAcc = findAccountByMs(msAccount.username) || {id: "MHF_Question", name: "..."};
|
||||
addMcAccountToList(mcAcc.id, mcAcc.name, msAccount.username);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user