fixed page changing twice on sign out

This commit is contained in:
Miodec 2022-02-19 21:10:03 +01:00
parent 9fe003aeab
commit a008fef06c

View file

@ -266,16 +266,18 @@ const authListener = firebase.auth().onAuthStateChanged(async function (user) {
}
PageTransition.set(false);
}
if (window.location.pathname == "/login" && user) {
PageController.change("account");
} else if (window.location.pathname != "/account") {
PageController.change();
setTimeout(() => {
Focus.set(false);
}, 125 / 2);
} else {
Account.update();
// SignOutButton.show();
if (user) {
if (window.location.pathname == "/login") {
PageController.change("account");
} else if (window.location.pathname != "/account") {
PageController.change();
setTimeout(() => {
Focus.set(false);
}, 125 / 2);
} else {
Account.update();
// SignOutButton.show();
}
}
let theme = Misc.findGetParameter("customTheme");