diff --git a/lib/screens/gl_screen_data.ex b/lib/screens/gl_screen_data.ex index 0d46b5d0e..6c68ff6b4 100644 --- a/lib/screens/gl_screen_data.ex +++ b/lib/screens/gl_screen_data.ex @@ -7,6 +7,17 @@ defmodule Screens.GLScreenData do alias Screens.Config.{Gl, State} def by_screen_id(screen_id, is_screen) do + if State.mode_disabled?(:light_rail) do + %{ + force_reload: false, + success: false + } + else + by_enabled_screen_id(screen_id, is_screen) + end + end + + defp by_enabled_screen_id(screen_id, is_screen) do %Gl{ stop_id: stop_id, route_id: route_id, diff --git a/lib/screens/nearby_departures.ex b/lib/screens/nearby_departures.ex index 1d8c9417d..243535276 100644 --- a/lib/screens/nearby_departures.ex +++ b/lib/screens/nearby_departures.ex @@ -4,7 +4,7 @@ defmodule Screens.NearbyDepartures do alias Screens.Config.{Gl, State} def by_screen_id(screen_id) do - if State.mode_disabled?(:bus) do + if State.mode_disabled?(:bus) or State.mode_disabled?(:light_rail) do [] else by_enabled_screen_id(screen_id) diff --git a/lib/screens/v2/candidate_generator/gl_eink.ex b/lib/screens/v2/candidate_generator/gl_eink.ex index 62344ce57..f6c016535 100644 --- a/lib/screens/v2/candidate_generator/gl_eink.ex +++ b/lib/screens/v2/candidate_generator/gl_eink.ex @@ -42,7 +42,7 @@ defmodule Screens.V2.CandidateGenerator.GlEink do # slot to its left, while still allowing the normal flex zone # to appear on the bottom screen. top_takeover: [ - :full_main_content, + :full_body_top_screen, Builder.with_paging({:flex_zone, %{one_medium: [:medium]}}, 2), :footer ], diff --git a/lib/screens/v2/widget_instance/departures_no_data.ex b/lib/screens/v2/widget_instance/departures_no_data.ex index 54383b1c6..185b1a515 100644 --- a/lib/screens/v2/widget_instance/departures_no_data.ex +++ b/lib/screens/v2/widget_instance/departures_no_data.ex @@ -24,7 +24,7 @@ defmodule Screens.V2.WidgetInstance.DeparturesNoData do def slot_names(%__MODULE__{slot_name: slot_name}) when not is_nil(slot_name), do: [slot_name] - def slot_names(%__MODULE__{screen: %Screen{app_id: :gl_eink_v2}}), do: [:full_main_content] + def slot_names(%__MODULE__{screen: %Screen{app_id: :gl_eink_v2}}), do: [:full_body_top_screen] def slot_names(_instance), do: [:main_content] def widget_type(_instance), do: :departures_no_data def valid_candidate?(_instance), do: true diff --git a/test/screens/v2/candidate_generator/gl_eink_test.exs b/test/screens/v2/candidate_generator/gl_eink_test.exs index ad86905a5..40d86203d 100644 --- a/test/screens/v2/candidate_generator/gl_eink_test.exs +++ b/test/screens/v2/candidate_generator/gl_eink_test.exs @@ -44,7 +44,7 @@ defmodule Screens.V2.CandidateGenerator.GlEinkTest do :footer ], top_takeover: [ - :full_main_content, + :full_body_top_screen, {{0, :flex_zone}, %{one_medium: [{0, :medium}]}}, {{1, :flex_zone}, %{one_medium: [{1, :medium}]}}, :footer diff --git a/test/screens/v2/widget_instance/departures_no_data_test.exs b/test/screens/v2/widget_instance/departures_no_data_test.exs index 1022dfbf8..90660f08f 100644 --- a/test/screens/v2/widget_instance/departures_no_data_test.exs +++ b/test/screens/v2/widget_instance/departures_no_data_test.exs @@ -37,7 +37,7 @@ defmodule Screens.V2.WidgetInstance.DeparturesNoDataTest do describe "slot_names/1" do test "returns full_body_top_screen for gl_eink_v2", %{gl_eink_widget: gl_eink_widget} do - assert [:full_main_content] == WidgetInstance.slot_names(gl_eink_widget) + assert [:full_body_top_screen] == WidgetInstance.slot_names(gl_eink_widget) end test "returns main_content", %{widget: widget} do