parent
197b5d4a09
commit
1e6da2872b
|
@ -51,9 +51,6 @@ final class Env(
|
|||
scheduler.message(1 seconds) {
|
||||
lobby -> lila.socket.actorApi.Broom
|
||||
}
|
||||
scheduler.message(10 seconds) {
|
||||
socket -> actorApi.Resync
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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) = {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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';
|
||||
|
|
1
todo
1
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)
|
||||
|
|
Loading…
Reference in New Issue