diff --git a/lib/philomena_web/image_loader.ex b/lib/philomena_web/image_loader.ex index 54c4e400..e67f94c4 100644 --- a/lib/philomena_web/image_loader.ex +++ b/lib/philomena_web/image_loader.ex @@ -79,7 +79,7 @@ defmodule PhilomenaWeb.ImageLoader do # Allow users to reverse the effect of hiding images, # if desired - defp maybe_custom_hide(filters, %{id: id}, "1"), + defp maybe_custom_hide(filters, %{id: _id}, "1"), do: filters defp maybe_custom_hide(filters, %{id: id}, _param), diff --git a/lib/philomena_web/views/image_view.ex b/lib/philomena_web/views/image_view.ex index 48da211c..220dfe70 100644 --- a/lib/philomena_web/views/image_view.ex +++ b/lib/philomena_web/views/image_view.ex @@ -174,7 +174,7 @@ defmodule PhilomenaWeb.ImageView do def hides_images?(conn), do: can?(conn, :hide, %Philomena.Images.Image{}) def hidden_toggle(%{assigns: %{current_user: nil}}, _route, _params), do: nil - def hidden_toggle(%{assigns: %{current_user: user}} = conn, route, params) do + def hidden_toggle(conn, route, params) do render PhilomenaWeb.ImageView, "_hidden_toggle.html", route: route, params: params, conn: conn end