From afa186cdf40bc0bcfe310edffd756b56d8e85c22 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Mon, 1 Dec 2025 15:10:02 +0000 Subject: [PATCH] Keep the room creation spinner open until the new room is received from server (#31311) In the upcoming work for encrypted state, we need to keep the spinner until the m.room.encryption event is received. This change keeps the spinner just a little longer than before: until the room is received from the server. I'm submitting this change partly because I think it makes sense to delay until we can confirm the room exists and partly to separate this change from other changes that will be involved in encrypted state. That way if this causes problems we can discuss or revert it separately. --- src/createRoom.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/createRoom.ts b/src/createRoom.ts index 8e39260921..e819bf39af 100644 --- a/src/createRoom.ts +++ b/src/createRoom.ts @@ -316,9 +316,6 @@ export default async function createRoom(client: MatrixClient, opts: IOpts): Pro return Promise.reject(err); } }) - .finally(function () { - if (modal) modal.close(); - }) .then(async (res): Promise => { roomId = res.room_id; @@ -340,6 +337,9 @@ export default async function createRoom(client: MatrixClient, opts: IOpts): Pro if (opts.dmUserId) await Rooms.setDMRoom(client, roomId, opts.dmUserId); }) + .finally(function () { + if (modal) modal.close(); + }) .then(() => { if (opts.parentSpace) { return SpaceStore.instance.addRoomToSpace(