Private
Public Access
1
0

fix: usr: do not hide the end-game overlay ever #8

This commit is contained in:
2026-04-21 08:48:44 +02:00
parent 20a969705d
commit 0d04ec91e7
3 changed files with 10 additions and 5 deletions

View File

@@ -211,7 +211,7 @@ const useServerCommunication = (gameAssoc, gameInherited, opponentName, isEnvDev
* For a truly restored game, keep the "Waiting for opponent..." overlay
* up until we actually see a heartbeat from the other player.
*/
if (!isTrueRestoredRef.current || 0 !== opponentLastSeenRef.current) {
if (!endRef.current && (!isTrueRestoredRef.current || 0 !== opponentLastSeenRef.current)) {
hideOverlay();
}
};
@@ -366,7 +366,7 @@ const useServerCommunication = (gameAssoc, gameInherited, opponentName, isEnvDev
if (me && payload.color && payload.color !== me) {
const wasFirst = 0 === opponentLastSeenRef.current;
opponentLastSeenRef.current = Date.now();
if (wasFirst && isTrueRestoredRef.current) {
if (wasFirst && isTrueRestoredRef.current && !endRef.current) {
hideOverlay();
}
}