diff --git a/modules/lobby/src/main/Env.scala b/modules/lobby/src/main/Env.scala index 95f7cdcb53..f2d1ec9735 100644 --- a/modules/lobby/src/main/Env.scala +++ b/modules/lobby/src/main/Env.scala @@ -51,9 +51,6 @@ final class Env( scheduler.message(1 seconds) { lobby -> lila.socket.actorApi.Broom } - scheduler.message(10 seconds) { - socket -> actorApi.Resync - } } } diff --git a/modules/lobby/src/main/Lobby.scala b/modules/lobby/src/main/Lobby.scala index 859ec4ef75..a5027ffb71 100644 --- a/modules/lobby/src/main/Lobby.scala +++ b/modules/lobby/src/main/Lobby.scala @@ -2,9 +2,10 @@ package lila.lobby import scala.concurrent.duration._ -import actorApi._ import akka.actor._ import akka.pattern.{ ask, pipe } + +import actorApi._ import lila.db.api._ import lila.hub.actorApi.GetUids import lila.memo.ExpireSetMemo @@ -17,7 +18,7 @@ private[lobby] final class Lobby( def receive = { - case GetOpen ⇒ sender ! HookRepo.allOpen + case GetOpen ⇒ sender ! HookRepo.allOpen case msg @ AddHook(hook) ⇒ { HookRepo byUid hook.uid foreach remove @@ -46,8 +47,6 @@ private[lobby] final class Lobby( HookRepo.cleanupOld foreach remove } } - - case Resync ⇒ socket ! HookIds(HookRepo.list map (_.id)) } private def remove(hook: Hook) = { diff --git a/modules/lobby/src/main/Socket.scala b/modules/lobby/src/main/Socket.scala index 7e289cb13d..509e595e07 100644 --- a/modules/lobby/src/main/Socket.scala +++ b/modules/lobby/src/main/Socket.scala @@ -2,9 +2,13 @@ package lila.lobby import scala.concurrent.duration._ -import actorApi._ import akka.actor._ import akka.pattern.ask +import play.api.libs.iteratee._ +import play.api.libs.json._ +import play.api.templates.Html + +import actorApi._ import lila.game.actorApi._ import lila.hub.actorApi.lobby._ import lila.hub.actorApi.router.{ Homepage, Player } @@ -12,9 +16,6 @@ import lila.hub.actorApi.timeline._ import lila.socket.actorApi.{ Connected ⇒ _, _ } import lila.socket.{ SocketActor, History, Historical } import makeTimeout.short -import play.api.libs.iteratee._ -import play.api.libs.json._ -import play.api.templates.Html private[lobby] final class Socket( val history: History, @@ -57,11 +58,9 @@ private[lobby] final class Socket( } case ChangeFeatured(html) ⇒ notifyFeatured(html) - - case HookIds(ids) ⇒ notifyVersion("hook_list", ids) } - private def playerUrl(fullId: String) = + private def playerUrl(fullId: String) = router ? Player(fullId) mapTo manifest[String] private def notifyFeatured(html: Html) { diff --git a/modules/lobby/src/main/actorApi.scala b/modules/lobby/src/main/actorApi.scala index e046c925d8..34b9793829 100644 --- a/modules/lobby/src/main/actorApi.scala +++ b/modules/lobby/src/main/actorApi.scala @@ -26,7 +26,5 @@ case class CancelHook(uid: String) case class BiteHook(hookId: String, uid: String, userId: Option[String]) case class JoinHook(uid: String, hook: Hook, game: Game) case class Join(uid: String, user: Option[User]) -case object Resync -case class HookIds(ids: List[String]) case object GetOpen diff --git a/public/javascripts/big.js b/public/javascripts/big.js index 5da614d969..a979264578 100644 --- a/public/javascripts/big.js +++ b/public/javascripts/big.js @@ -2081,7 +2081,6 @@ var storage = { }, hook_add: addHook, hook_remove: removeHook, - hook_list: syncHookIds, featured: changeFeatured, redirect: function(e) { $.lichessOpeningPreventClicks(); @@ -2125,13 +2124,6 @@ var storage = { drawHooks(); } - function syncHookIds(ids) { - pool = _.filter(pool, function(h) { - return _.contains(ids, h.id); - }); - drawHooks(); - } - function addHook(hook, inBatch) { if (!isRegistered && hook.mode == "Casual" && !hook.allowAnon) return; if (!isRegistered && hook.mode == "Rated") hook.action = 'register'; diff --git a/todo b/todo index c607ddb3a9..9d17a286bb 100644 --- a/todo +++ b/todo @@ -57,4 +57,3 @@ customize sound notifications http://imgur.com/70WVyb5 opera issue http://en.lichess.org/forum/lichess-feedback/new-game-wont-show-on-games-list-opera#1 embedded games links http://2ls.ru/chessonline/ filter ranges http://en.lichess.org/forum/lichess-feedback/my-proposed-changes-with-filter-window#1 -hooks resync (chrome does not remove them all)