This commit is contained in:
byte[] 2021-02-09 17:24:41 -05:00
parent 702d096ecf
commit 62143a3910
2 changed files with 7 additions and 3 deletions

View file

@ -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

View file

@ -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]