Skip to content

Commit

Permalink
scala tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Feb 12, 2025
1 parent f79efb6 commit 3e5ac24
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion modules/api/src/main/Env.scala
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ final class Env(
cacheApi: lila.memo.CacheApi,
webConfig: lila.web.WebConfig,
realPlayerApi: lila.web.RealPlayerApi,
bookmarkExists: lila.core.bookmark.BookmarkExists,
bookmarkExists: lila.core.misc.BookmarkExists,
manifest: lila.web.AssetManifest,
tokenApi: lila.oauth.AccessTokenApi
)(using val mode: Mode, scheduler: Scheduler)(using
Expand Down
2 changes: 1 addition & 1 deletion modules/bookmark/src/main/Env.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class Env(

lazy val api = wire[BookmarkApi]

def exists: lila.core.bookmark.BookmarkExists = api.exists
def exists: lila.core.misc.BookmarkExists = api.exists

lila.common.Bus.subscribeFun("roundUnplayed"):
case lila.core.round.DeleteUnplayed(gameId) => api.removeByGameId(gameId)
4 changes: 0 additions & 4 deletions modules/core/src/main/bookmark.scala

This file was deleted.

2 changes: 2 additions & 0 deletions modules/core/src/main/misc.scala
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,5 @@ trait PicfitUrl:
def thumbnail(id: lila.core.id.ImageId, width: Int, height: Int): String
def resize(id: lila.core.id.ImageId, size: Either[Int, Int]): String
def raw(id: lila.core.id.ImageId): String

type BookmarkExists = (game.Game, Option[userId.UserId]) => Fu[Boolean]
1 change: 0 additions & 1 deletion modules/game/src/test/EventTest.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package lila.game

import cats.syntax.all.*
import chess.*
import chess.bitboard.Bitboard
import chess.variant.Crazyhouse
Expand Down
1 change: 0 additions & 1 deletion modules/plan/src/main/PlanApi.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package lila.plan

import play.api.i18n.Lang
import reactivemongo.api.*
import cats.syntax.all.*

import lila.common.Bus
import lila.core.config.Secret
Expand Down
2 changes: 1 addition & 1 deletion modules/round/src/main/Env.scala
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ final class Env(
socketKit: lila.core.socket.ParallelSocketKit,
userLagPut: lila.core.socket.userLag.Put,
lightUserApi: lila.user.LightUserApi,
bookmarkExists: lila.core.bookmark.BookmarkExists,
bookmarkExists: lila.core.misc.BookmarkExists,
simulApiCircularDep: => lila.core.simul.SimulApi,
settingStore: lila.memo.SettingStore.Builder,
shutdown: akka.actor.CoordinatedShutdown
Expand Down
2 changes: 1 addition & 1 deletion modules/round/src/main/RoundMobile.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ final class RoundMobile(
moretimer: Moretimer,
isOfferingRematch: lila.core.round.IsOfferingRematch,
chatApi: lila.chat.ChatApi,
bookmarkExists: lila.core.bookmark.BookmarkExists
bookmarkExists: lila.core.misc.BookmarkExists
)(using Executor, lila.core.user.FlairGetMap):

import RoundMobile.*
Expand Down

0 comments on commit 3e5ac24

Please sign in to comment.