From f56ce27780b1d15e0ab1aa903db1b17f0ade0d6f Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Tue, 9 Feb 2021 17:28:24 -0500 Subject: [PATCH] ignore explicit activity routing --- lib/philomena_web/controllers/activity_controller.ex | 7 +------ lib/philomena_web/router.ex | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/philomena_web/controllers/activity_controller.ex b/lib/philomena_web/controllers/activity_controller.ex index 59a65760..acc29ac4 100644 --- a/lib/philomena_web/controllers/activity_controller.ex +++ b/lib/philomena_web/controllers/activity_controller.ex @@ -117,7 +117,7 @@ defmodule PhilomenaWeb.ActivityController do topics: topics, interactions: interactions, layout_class: "layout--wide", - show_sidebar: show_sidebar?(user) || !index_page?(conn) + show_sidebar: show_sidebar?(user) ) end @@ -167,11 +167,6 @@ defmodule PhilomenaWeb.ActivityController do ) end - defp index_page?(%{assigns: %{index: true}}), do: true - - defp index_page?(_conn), do: false - defp show_sidebar?(%{show_sidebar_and_watched_images: false}), do: false - defp show_sidebar?(_user), do: true end diff --git a/lib/philomena_web/router.ex b/lib/philomena_web/router.ex index c4f8197e..d9c4b5fb 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 resources "/activity", ActivityController, only: [:index]