fixing notifications again
This commit is contained in:
parent
f37cab9cc6
commit
5e19473e53
@ -28,11 +28,6 @@ class OnlineMatchManager
|
||||
|
||||
this.match_button.className = "infobar-button-active";
|
||||
|
||||
if (this.match_state.active_player == this.local_player.get_name())
|
||||
{
|
||||
this.game_server_connection.notify("your turn against " + this.online_opponent.get_name());
|
||||
}
|
||||
|
||||
this.is_closed = false;
|
||||
|
||||
}
|
||||
|
2
sw.js
2
sw.js
@ -39,5 +39,5 @@ self.addEventListener('fetch', function (event) {
|
||||
|
||||
self.addEventListener('notificationclick', function (event) {
|
||||
event.notification.close();
|
||||
clients.openWindow(rel_home);
|
||||
clients.openWindow(home);
|
||||
});
|
@ -182,6 +182,10 @@ class WebsocketConnection
|
||||
if (!match_state.game_over)
|
||||
{
|
||||
this.openmatches[id] = new OnlineMatchManager(this.grid, this.status_label, this.matches_container, this.control_container, this, id, match_state, this.player.get_name());
|
||||
if (match_state.last_move == null)
|
||||
{
|
||||
this.notify("new Game against " + this.openmatches[id].online_opponent.get_name());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user