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]