1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-07 21:23:00 +03:00

Simplify UserMenu for Guests as they can't use most of the options

This commit is contained in:
Michael Telatynski
2020-11-12 12:46:55 +00:00
parent f73573881e
commit 5f23c9499c
4 changed files with 73 additions and 8 deletions

View File

@@ -588,9 +588,9 @@ export function logout(): void {
if (MatrixClientPeg.get().isGuest()) {
// logout doesn't work for guest sessions
// Also we sometimes want to re-log in a guest session
// if we abort the login
onLoggedOut();
// Also we sometimes want to re-log in a guest session if we abort the login.
// defer until next tick because it calls a synchronous dispatch and we are likely here from a dispatch.
setImmediate(() => onLoggedOut());
return;
}