fix: usr: do not hide the end-game overlay ever #8
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user