Skip to content

Commit

Permalink
Merge pull request #58 from CS3219-AY2425S1/solomon/fix-code-saved-me…
Browse files Browse the repository at this point in the history
…ssage-appearing-on-end-session

Fix code saved message appearing on end session
  • Loading branch information
bensohh authored Nov 1, 2024
2 parents 1475c05 + 6f8952f commit 0427229
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ interface AwarenessUpdate {
}

interface Awareness {
sessionEnded: boolean;
user: {
name: string;
color: string;
Expand Down Expand Up @@ -245,7 +246,7 @@ const CollaborativeEditor = forwardRef(
const state = provider.awareness
.getStates()
.get(clientID) as Awareness;
if (state && state.codeSavedStatus) {
if (state && state.codeSavedStatus && !state.sessionEnded) {
// Display the received status message
messageApi.open({
type: "success",
Expand Down

0 comments on commit 0427229

Please sign in to comment.