disable round other games reload on opponent play
This commit is contained in:
parent
26270deeb3
commit
2d34eb4e21
|
@ -6,12 +6,11 @@ import scala.collection.mutable
|
|||
import scala.concurrent.duration._
|
||||
|
||||
import actorApi.{ SocketLeave, SocketEnter }
|
||||
import lila.hub.actorApi.round.MoveEvent
|
||||
import lila.hub.actorApi.{ SendTo, SendTos, WithUserIds }
|
||||
|
||||
private final class UserRegister extends Actor {
|
||||
|
||||
context.system.lilaBus.subscribe(self, 'users, 'socketDoor, 'moveEvent)
|
||||
context.system.lilaBus.subscribe(self, 'users, 'socketDoor)
|
||||
|
||||
type UID = String
|
||||
type UserId = String
|
||||
|
@ -26,10 +25,6 @@ private final class UserRegister extends Actor {
|
|||
|
||||
case WithUserIds(f) => f(users.keys)
|
||||
|
||||
case move: MoveEvent => move.opponentUserId foreach { userId =>
|
||||
sendTo(userId, Socket.makeMessage("opponent_play", move.gameId))
|
||||
}
|
||||
|
||||
case SocketEnter(uid, member) => member.userId foreach { userId =>
|
||||
users get userId match {
|
||||
case None => users += (userId -> mutable.Map(uid -> member))
|
||||
|
|
|
@ -807,18 +807,6 @@ var storage = {
|
|||
$('div.check_count')
|
||||
.find('.white').text(e.black).end()
|
||||
.find('.black').text(e.white);
|
||||
},
|
||||
opponent_play: function(e) {
|
||||
$.ajax({
|
||||
url: $nowPlaying.data('reload-url'),
|
||||
success: function(html) {
|
||||
$nowPlaying.html(html);
|
||||
$('body').trigger('lichess.content_loaded');
|
||||
loadPlaying();
|
||||
var nextId = $nowPlaying.find('input.next_id').val();
|
||||
if (nextId) round.moveOn.next(nextId);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue