mirror of
https://jihulab.com/mr-one/openpilot.git
synced 2026-10-28 05:23:46 +08:00
Galaxy WebUI: Unload speed limit panel
This commit is contained in:
@@ -91,7 +91,18 @@ export function SpeedLimits() {
|
||||
fetchStatus()
|
||||
|
||||
if (pollTimer === null) {
|
||||
pollTimer = setInterval(fetchStatus, 3000)
|
||||
pollTimer = setInterval(() => {
|
||||
if (window.location.pathname !== "/download_speed_limits") {
|
||||
clearInterval(pollTimer)
|
||||
pollTimer = null
|
||||
state.fetched = false
|
||||
return
|
||||
}
|
||||
if (document.visibilityState !== "visible") {
|
||||
return
|
||||
}
|
||||
fetchStatus()
|
||||
}, 3000)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user