mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-07 23:18:21 +00:00
Fix space hierarchy tile busy state being stuck after join error (#12405)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
committed by
GitHub
parent
5815e70b76
commit
1149b13502
@@ -136,11 +136,12 @@ const Tile: React.FC<ITileProps> = ({
|
|||||||
setBusy(true);
|
setBusy(true);
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
onJoinRoomClick()
|
try {
|
||||||
.then(() => awaitRoomDownSync(cli, room.room_id))
|
await onJoinRoomClick();
|
||||||
.finally(() => {
|
await awaitRoomDownSync(cli, room.room_id);
|
||||||
setBusy(false);
|
} finally {
|
||||||
});
|
setBusy(false);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let button: ReactElement;
|
let button: ReactElement;
|
||||||
@@ -418,7 +419,8 @@ export const joinRoom = async (cli: MatrixClient, hierarchy: RoomHierarchy, room
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
// rethrow error so that the caller can handle react to it too
|
||||||
|
throw err;
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultDispatcher.dispatch<JoinRoomReadyPayload>({
|
defaultDispatcher.dispatch<JoinRoomReadyPayload>({
|
||||||
|
|||||||
Reference in New Issue
Block a user