From f42795e76a6002c44ccc3031906ec84d185ea470 Mon Sep 17 00:00:00 2001 From: Thibault Duplessis Date: Sun, 12 Oct 2014 17:56:02 +0200 Subject: [PATCH] remove pools from homepage --- app/controllers/Lobby.scala | 4 ++-- app/mashup/Preload.scala | 10 +++------- app/views/lobby/home.scala.html | 4 +--- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/app/controllers/Lobby.scala b/app/controllers/Lobby.scala index 318d084067..0a17d9da04 100644 --- a/app/controllers/Lobby.scala +++ b/app/controllers/Lobby.scala @@ -32,10 +32,10 @@ object Lobby extends LilaController { tours = Env.tournament promotable true, filter = Env.setup.filter ).map { - case (preload, entries, posts, tours, featured, lead, tWinners, puzzle, playing, pools, streams, nbRounds) => + case (preload, entries, posts, tours, featured, lead, tWinners, puzzle, playing, streams, nbRounds) => val response = status(html.lobby.home( Json stringify preload, entries, posts, tours, featured, lead, tWinners, - puzzle, playing, streams, Env.blog.lastPostCache.apply, pools, nbRounds + puzzle, playing, streams, Env.blog.lastPostCache.apply, nbRounds )) // the session cookie is required for anon lobby filter storage ctx.req.session.data.contains(LilaCookie.sessionId).fold( diff --git a/app/mashup/Preload.scala b/app/mashup/Preload.scala index 7bbff1f470..e1a12b77be 100644 --- a/app/mashup/Preload.scala +++ b/app/mashup/Preload.scala @@ -12,7 +12,6 @@ import lila.forum.MiniForumPost import lila.game.{ Game, GameRepo, Pov } import lila.lobby.actorApi.GetOpen import lila.lobby.{ Hook, HookRepo } -import lila.pool.Pool import lila.rating.PerfType import lila.setup.FilterConfig import lila.socket.History @@ -32,10 +31,9 @@ final class Preload( nowPlaying: (User, Int) => Fu[List[Pov]], streamsOnAir: => () => Fu[List[StreamOnAir]], dailyPuzzle: () => Fu[Option[lila.puzzle.DailyPuzzle]], - getPools: () => Fu[List[Pool]], countRounds: () => Fu[Int]) { - private type Response = (JsObject, List[Entry], List[MiniForumPost], List[Enterable], Option[Game], List[(User, PerfType)], List[Winner], Option[lila.puzzle.DailyPuzzle], List[Pov], List[Pool], List[StreamOnAir], Int) + private type Response = (JsObject, List[Entry], List[MiniForumPost], List[Enterable], Option[Game], List[(User, PerfType)], List[Winner], Option[lila.puzzle.DailyPuzzle], List[Pov], List[StreamOnAir], Int) def apply( posts: Fu[List[MiniForumPost]], @@ -51,14 +49,12 @@ final class Preload( dailyPuzzle() zip (ctx.me ?? { nowPlaying(_, 3) }) zip filter zip - getPools() zip streamsOnAir() zip countRounds() map { - case ((((((((((((hooks, posts), tours), feat), entries), lead), tWinners), puzzle), playing), filter), pools), streams), nbRounds) => + case (((((((((((hooks, posts), tours), feat), entries), lead), tWinners), puzzle), playing), filter), streams), nbRounds) => (Json.obj( "version" -> lobbyVersion(), - "pool" -> JsArray(hooks map (_.render)), "filter" -> filter.render - ), entries, posts, tours, feat, lead, tWinners, puzzle, playing, pools, streams, nbRounds) + ), entries, posts, tours, feat, lead, tWinners, puzzle, playing, streams, nbRounds) } } diff --git a/app/views/lobby/home.scala.html b/app/views/lobby/home.scala.html index 7d684a6020..90323fa7ba 100644 --- a/app/views/lobby/home.scala.html +++ b/app/views/lobby/home.scala.html @@ -1,4 +1,4 @@ -@(preload: String, userTimeline: List[lila.timeline.Entry], forumRecent: List[lila.forum.MiniForumPost], tours: List[lila.tournament.Enterable], featured: Option[Game], leaderboard: List[(User, lila.rating.PerfType)], tournamentWinners: List[lila.tournament.Winner], puzzle: Option[lila.puzzle.DailyPuzzle], playing: List[Pov], streams: List[lila.tv.StreamOnAir], lastPost: List[lila.blog.MiniPost], pools: List[lila.pool.Pool], nbRounds: Int)(implicit ctx: Context) +@(preload: String, userTimeline: List[lila.timeline.Entry], forumRecent: List[lila.forum.MiniForumPost], tours: List[lila.tournament.Enterable], featured: Option[Game], leaderboard: List[(User, lila.rating.PerfType)], tournamentWinners: List[lila.tournament.Winner], puzzle: Option[lila.puzzle.DailyPuzzle], playing: List[Pov], streams: List[lila.tv.StreamOnAir], lastPost: List[lila.blog.MiniPost], nbRounds: Int)(implicit ctx: Context) @underchat = {