Skip to content

Commit

Permalink
Comment out game observing code
Browse files Browse the repository at this point in the history
  • Loading branch information
Thrillberg committed Apr 4, 2024
1 parent 9ad62b4 commit 6c58865
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions app/javascript/src/views/Game.vue
Expand Up @@ -642,7 +642,8 @@ export default {
TurnStatus,
},
beforeRouteLeave(to, from, next) {
apiClient.userStoppedObservingGame(this.profile.username, this.$route.params.id);
// TODO: Uncomment when we want to implement game-observing users
// apiClient.userStoppedObservingGame(this.profile.username, this.$route.params.id);
next();
},
props: {
Expand Down Expand Up @@ -728,7 +729,8 @@ export default {
created() {
apiClient.getGameLog(this.$route.params.id);
window.addEventListener('beforeunload', this.beforeWindowUnload);
apiClient.userObservingGame(this.profile.username, this.$route.params.id);
// TODO: Uncomment when we want to implement game-observing users
// apiClient.userObservingGame(this.profile.username, this.$route.params.id);
setFavicon(this.games, this.profile, this.$route.params.id);
},
updated() {
Expand All @@ -750,9 +752,10 @@ export default {
import('../boardAsiaConfigs').then((resp) => { this.boardConfig = resp.default.imperialAsia; });
}
},
beforeWindowUnload() {
apiClient.userStoppedObservingGame(this.profile.username, this.$route.params.id);
},
// TODO: Uncomment when we want to implement game-observing users
// beforeWindowUnload() {
// apiClient.userStoppedObservingGame(this.profile.username, this.$route.params.id);
// },
otherPlayersInGame() {
const players = this.playersInGame;
return players.filter((player) => player !== this.profile.username);
Expand Down

0 comments on commit 6c58865

Please sign in to comment.