Skip to content

Commit

Permalink
chore: update screens-config-lib (remove v1)
Browse files Browse the repository at this point in the history
This updates the library to the latest version, which removes config
definitions for "v1" screens and the `v2_screen?` function. Support
for "v1" screens in this app was already mostly removed in cd49ce0.
  • Loading branch information
digitalcora committed Nov 14, 2024
1 parent ce58ed3 commit 3a6a6f9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
15 changes: 3 additions & 12 deletions lib/screens/screens_by_alert/self_refresh_runner.ex
Original file line number Diff line number Diff line change
Expand Up @@ -83,21 +83,12 @@ defmodule Screens.ScreensByAlert.SelfRefreshRunner do
end

defp watched_screen_ids do
Screens.Config.Cache.screen_ids(fn {_screen_id, screen_config} ->
valid_for_self_refresh?(screen_config)
Screens.Config.Cache.screen_ids(fn
{_screen_id, %Screen{hidden_from_screenplay: true}} -> false
_ -> true
end)
end

# A screen is valid for self-refresh if all of these are true:
# - It's a v2 screen (i.e., it shows widgets)
# - It's not hidden from Screenplay
defp valid_for_self_refresh?(screen_config) do
is_v2 = Screen.v2_screen?(screen_config)
is_visible_to_screenplay = not screen_config.hidden_from_screenplay

is_v2 and is_visible_to_screenplay
end

defp schedule_run do
Process.send_after(self(), :run, @job_run_interval_ms)
end
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ defmodule Screens.MixProject do
{:telemetry_metrics, "~> 0.4"},
{:screens_config,
git: "https://github.com/mbta/screens-config-lib.git",
ref: "588dacf1bfaf7aa6356f0ee741bb4b49176834cc"},
ref: "c0db78ecd43c633a55a1f24b268ae7b8a5214748"},
{:nebulex, "~> 2.6"},
{:remote_ip, "~> 1.2"},
{:hackney_telemetry, "~> 0.2.0"},
Expand Down
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"recon": {:hex, :recon, "2.5.6", "9052588e83bfedfd9b72e1034532aee2a5369d9d9343b61aeb7fbce761010741", [:mix, :rebar3], [], "hexpm", "96c6799792d735cc0f0fd0f86267e9d351e63339cbe03df9d162010cefc26bb0"},
"remote_ip": {:hex, :remote_ip, "1.2.0", "fb078e12a44414f4cef5a75963c33008fe169b806572ccd17257c208a7bc760f", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "2ff91de19c48149ce19ed230a81d377186e4412552a597d6a5137373e5877cb7"},
"retry": {:hex, :retry, "0.18.0", "dc58ebe22c95aa00bc2459f9e0c5400e6005541cf8539925af0aa027dc860543", [:mix], [], "hexpm", "9483959cc7bf69c9e576d9dfb2b678b71c045d3e6f39ab7c9aa1489df4492d73"},
"screens_config": {:git, "https://github.com/mbta/screens-config-lib.git", "588dacf1bfaf7aa6356f0ee741bb4b49176834cc", [ref: "588dacf1bfaf7aa6356f0ee741bb4b49176834cc"]},
"screens_config": {:git, "https://github.com/mbta/screens-config-lib.git", "c0db78ecd43c633a55a1f24b268ae7b8a5214748", [ref: "c0db78ecd43c633a55a1f24b268ae7b8a5214748"]},
"sentry": {:hex, :sentry, "10.7.1", "33392222d80ccff99c503f972998d2858b4c1e5aca2219a34269b68dacba8e7d", [:mix], [{:hackney, "~> 1.8", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:nimble_options, "~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_ownership, "~> 0.3.0 or ~> 1.0", [hex: :nimble_ownership, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.6", [hex: :phoenix, repo: "hexpm", optional: true]}, {:phoenix_live_view, "~> 0.20", [hex: :phoenix_live_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.6", [hex: :plug, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "56291312397bf2b6afab6cf4f7aa1f27413b0eb2ceeb63b8aab2d7658aaea882"},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"},
"stream_data": {:hex, :stream_data, "1.1.2", "05499eaec0443349ff877aaabc6e194e82bda6799b9ce6aaa1aadac15a9fdb4d", [:mix], [], "hexpm", "129558d2c77cbc1eb2f4747acbbea79e181a5da51108457000020a906813a1a9"},
Expand Down

0 comments on commit 3a6a6f9

Please sign in to comment.