Make battery history update when fetching telemetry

This commit is contained in:
Gnome Adrift
2026-03-30 10:07:20 -07:00
parent 7f7e8cacd1
commit c393e8c03e
2 changed files with 4 additions and 1 deletions
@@ -291,6 +291,7 @@ export function RepeaterDashboard({
publicKey={conversation.id}
isTracked={telemetryTracked}
onToggleTracking={handleToggleTelemetryTracking}
statusFetchedAt={paneStates.status.fetched_at}
/>
<RadioSettingsPane
data={paneData.radioSettings}
@@ -17,10 +17,12 @@ export function BatteryHistoryPane({
publicKey,
isTracked,
onToggleTracking,
statusFetchedAt,
}: {
publicKey: string;
isTracked: boolean;
onToggleTracking: () => void;
statusFetchedAt?: number | null;
}) {
const chartRef = useRef<HTMLDivElement>(null);
const uplotRef = useRef<uPlot | null>(null);
@@ -47,7 +49,7 @@ export function BatteryHistoryPane({
useEffect(() => {
fetchHistory(range);
}, [fetchHistory, range]);
}, [fetchHistory, range, statusFetchedAt]);
// Build / rebuild chart
useEffect(() => {