From 0ff5575ede8a9e2316e7e5cf1415130a63488e35 Mon Sep 17 00:00:00 2001 From: Cora Grant Date: Fri, 13 Sep 2024 13:27:03 -0400 Subject: [PATCH] refactor: remove unused `shows_alerts?` code This is now an unused duplicate of logic that was moved into `ScreensConfig.Screen.shows_alerts?`. --- lib/screens/v2/screen_data/parameters.ex | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/lib/screens/v2/screen_data/parameters.ex b/lib/screens/v2/screen_data/parameters.ex index 0a2374463..d959b7108 100644 --- a/lib/screens/v2/screen_data/parameters.ex +++ b/lib/screens/v2/screen_data/parameters.ex @@ -38,9 +38,6 @@ defmodule Screens.V2.ScreenData.Parameters do triptych_v2: 0 } - # This list should contain IDs of any apps that __do not__ show any widget that implements `Screens.V2.AlertsWidget`. - @apps_that_do_not_show_alerts [:triptych_v2] - @spec get_candidate_generator(ScreensConfig.Screen.t() | atom()) :: candidate_generator() def get_candidate_generator(%ScreensConfig.Screen{app_id: app_id}) do get_candidate_generator(app_id) @@ -68,18 +65,6 @@ defmodule Screens.V2.ScreenData.Parameters do Map.get(@app_id_to_audio_readout_interval, app_id) end - @doc """ - Returns true for screen types that can show any widget that implements `Screens.V2.AlertsWidget`. - """ - @spec shows_alerts?(ScreensConfig.Screen.t() | atom()) :: boolean() - def shows_alerts?(%ScreensConfig.Screen{app_id: app_id}) do - shows_alerts?(app_id) - end - - def shows_alerts?(app_id) do - app_id not in @apps_that_do_not_show_alerts - end - @spec get_audio_interval_offset_seconds(ScreensConfig.Screen.t()) :: pos_integer() def get_audio_interval_offset_seconds(%ScreensConfig.Screen{ app_params: %ScreensConfig.V2.BusShelter{