Skip to content

Commit

Permalink
Make sure the latest connection is loaded (#1719)
Browse files Browse the repository at this point in the history
Fixes a UI issue where the connection status and information is removed
after a device heartbeat occurs
  • Loading branch information
joshk authored Dec 30, 2024
1 parent 5c704e9 commit 9c5db3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nerves_hub_web/live/devices/show.ex
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ defmodule NervesHubWeb.Live.Devices.Show do
def handle_info(%Broadcast{event: "connection:heartbeat"}, socket) do
%{device: device, org: org} = socket.assigns

{:ok, device} = Devices.get_device_by_identifier(org, device.identifier)
{:ok, device} = Devices.get_device_by_identifier(org, device.identifier, :latest_connection)

socket
|> assign(:device, device)
Expand Down

0 comments on commit 9c5db3e

Please sign in to comment.