From 15af0f1158b00bc059bd7b2fc9c118ae4313fcbf Mon Sep 17 00:00:00 2001 From: nelsonic Date: Sat, 16 Sep 2023 11:55:45 +0100 Subject: [PATCH] #423 mix format ... tidies items_with_timers/2 code & tests --- lib/app/item.ex | 15 ++++++++------- lib/app_web/live/app_live.ex | 1 - 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/app/item.ex b/lib/app/item.ex index 9280b4b4..fc8d8590 100644 --- a/lib/app/item.ex +++ b/lib/app/item.ex @@ -221,13 +221,14 @@ defmodule App.Item do ] """ def items_with_timers(person_id \\ 0, list_cid \\ nil) do - seq = if is_nil(list_cid) do - App.List.get_all_list_for_person(person_id) - |> App.List.get_list_seq() - else - App.List.get_list_by_cid!(list_cid) - |> App.List.get_list_seq() - end + seq = + if is_nil(list_cid) do + App.List.get_all_list_for_person(person_id) + |> App.List.get_list_seq() + else + App.List.get_list_by_cid!(list_cid) + |> App.List.get_list_seq() + end sql = """ SELECT i.id, i.cid, i.text, i.status, i.person_id, i.updated_at, diff --git a/lib/app_web/live/app_live.ex b/lib/app_web/live/app_live.ex index 834d2ea1..593f146c 100644 --- a/lib/app_web/live/app_live.ex +++ b/lib/app_web/live/app_live.ex @@ -16,7 +16,6 @@ defmodule AppWeb.AppLive do @impl true def mount(_params, _session, socket) do - # subscribe to the channel if connected?(socket), do: AppWeb.Endpoint.subscribe(@topic) AppWeb.Endpoint.subscribe(@stats_topic)