From 6d96353679db2c1e10a380524b6c60c363d81216 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Sun, 22 Mar 2020 14:28:09 +0100
Subject: [PATCH] Improvement attempt for connection indicator + Game
 robustness... fingers crossed

---
 client/src/views/Game.vue | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue
index f1521e67..f12290d7 100644
--- a/client/src/views/Game.vue
+++ b/client/src/views/Game.vue
@@ -456,19 +456,17 @@ export default {
           });
           break;
         case "connect":
-          console.log("connect " + data.from + " " + !!this.people[data.from]);
           if (!this.people[data.from]) {
             this.people[data.from] = { focus: true };
+            this.$forceUpdate(); //TODO: shouldn't be required
             this.newConnect[data.from] = true; //for self multi-connects tests
             this.send("askidentity", { target: data.from });
           }
           break;
         case "disconnect":
-          console.log("disconnect " + data.from);
           this.$delete(this.people, data.from);
           break;
         case "getfocus": {
-          console.log("get focus " + data.from + " " + !!this.people[data.from]);
           let player = this.people[data.from];
           if (!!player) {
             player.focus = true;
@@ -477,7 +475,6 @@ export default {
           break;
         }
         case "losefocus": {
-          console.log("lose focus " + data.from + " " + !!this.people[data.from]);
           let player = this.people[data.from];
           if (!!player) {
             player.focus = false;
@@ -526,6 +523,7 @@ export default {
           if (!this.killed[this.st.user.sid]) {
             // Ask potentially missed last state, if opponent and I play
             if (
+              !this.gotLastate &&
               !!this.game.mycolor &&
               this.game.type == "live" &&
               this.game.score == "*" &&
-- 
2.44.0