mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-05-01 11:02:56 +02:00
Make battery history update when fetching telemetry
This commit is contained in:
committed by
Jack Kingsman
parent
78b5598f67
commit
0511d6f69b
@@ -318,6 +318,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(() => {
|
||||
|
||||
Reference in New Issue
Block a user