From 62143a39100e629e4c1824ee8170cadf4b183cbb Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Tue, 9 Feb 2021 17:24:41 -0500 Subject: [PATCH] format --- lib/philomena_web/controllers/image_controller.ex | 8 ++++++-- lib/philomena_web/router.ex | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/philomena_web/controllers/image_controller.ex b/lib/philomena_web/controllers/image_controller.ex index bd88d4ec..eecd5c72 100644 --- a/lib/philomena_web/controllers/image_controller.ex +++ b/lib/philomena_web/controllers/image_controller.ex @@ -134,10 +134,14 @@ defmodule PhilomenaWeb.ImageController do end end - defp maybe_skip_to_last_comment_page(conn, image, %{comments_newest_first: false, comments_always_jump_to_last: true}) do + defp maybe_skip_to_last_comment_page(conn, image, %{ + comments_newest_first: false, + comments_always_jump_to_last: true + }) do page = CommentLoader.last_page(conn, image) + conn - |> assign(:comment_scrivener, Keyword.merge(conn.assigns.comment_scrivener, [page: page])) + |> assign(:comment_scrivener, Keyword.merge(conn.assigns.comment_scrivener, page: page)) end defp maybe_skip_to_last_comment_page(conn, _image, _user), do: conn diff --git a/lib/philomena_web/router.ex b/lib/philomena_web/router.ex index 0c68f519..c4f8197e 100644 --- a/lib/philomena_web/router.ex +++ b/lib/philomena_web/router.ex @@ -418,7 +418,7 @@ defmodule PhilomenaWeb.Router do scope "/", PhilomenaWeb do pipe_through [:browser, :ensure_totp, :ensure_tor_authorized] - get "/", ActivityController, :index, [assigns: %{index: true}] + get "/", ActivityController, :index, assigns: %{index: true} resources "/activity", ActivityController, only: [:index]