Skip to content

Commit e8bf66c

Browse files
authored
fix(flat-pages): refresh rooms list on any join room error (#2118)
1 parent 5738311 commit e8bf66c

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

packages/flat-pages/src/utils/join-room-handler.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ export const joinRoomHandler = async (
5050
);
5151
}
5252
} catch (e) {
53+
globalStore.updateRequestRefreshRooms(true);
54+
5355
// if room not found and is pmi room, show wait for teacher to enter
5456
if (e.errorCode === RequestErrorCode.RoomNotFoundAndIsPmi) {
5557
void message.info(FlatI18n.t("wait-for-teacher-to-enter"));
@@ -67,14 +69,9 @@ export const joinRoomHandler = async (
6769
};
6870
pushHistory(RouteNameType.HomePage);
6971
globalStore.updateRoomNotBegin(roomNotBegin);
70-
globalStore.updateRequestRefreshRooms(true);
7172
return;
7273
}
7374

74-
if (e.errorCode === RequestErrorCode.RoomNotBegin) {
75-
globalStore.updateRequestRefreshRooms(true);
76-
}
77-
7875
pushHistory(RouteNameType.HomePage);
7976
errorTips(e);
8077
}

0 commit comments

Comments
 (0)