Skip to content

Commit

Permalink
fix zoom setting
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed May 5, 2019
1 parent 5066def commit 0f74717
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/Pref.scala
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ object Pref extends LilaController {
def set(name: String) = OpenBody { implicit ctx =>
implicit val req = ctx.body
if (name == "zoom") {
Ok.withCookies(LilaCookie.session("zoom2", (getInt("v") | 180).toString)).fuccess
Ok.withCookies(LilaCookie.session("zoom2", (getInt("v") | 185).toString)).fuccess
} else {
implicit val req = ctx.body
(setters get name) ?? {
Expand Down
2 changes: 1 addition & 1 deletion modules/api/src/main/Context.scala
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ sealed trait Context extends lila.user.UserContextWrapper {
def requiresFingerprint = isAuth && !pageData.hasFingerprint

def zoom: Int = {
req.session get "zoom2" flatMap parseIntOption filter (0 <=) filter (100 >=)
req.session get "zoom2" flatMap parseIntOption map (_ - 100) filter (0 <=) filter (100 >=)
} | 85
}

Expand Down

0 comments on commit 0f74717

Please sign in to comment.