Skip to content

Commit 0427229

Browse files
authored
Merge pull request #58 from CS3219-AY2425S1/solomon/fix-code-saved-message-appearing-on-end-session
Fix code saved message appearing on end session
2 parents 1475c05 + 6f8952f commit 0427229

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/frontend/src/components/CollaborativeEditor/CollaborativeEditor.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ interface AwarenessUpdate {
4848
}
4949

5050
interface Awareness {
51+
sessionEnded: boolean;
5152
user: {
5253
name: string;
5354
color: string;
@@ -245,7 +246,7 @@ const CollaborativeEditor = forwardRef(
245246
const state = provider.awareness
246247
.getStates()
247248
.get(clientID) as Awareness;
248-
if (state && state.codeSavedStatus) {
249+
if (state && state.codeSavedStatus && !state.sessionEnded) {
249250
// Display the received status message
250251
messageApi.open({
251252
type: "success",

0 commit comments

Comments
 (0)