Skip to content

Commit

Permalink
Fix autorefresh ignored in extra content
Browse files Browse the repository at this point in the history
Bump version
Build package
  • Loading branch information
luc-github committed Dec 25, 2024
1 parent 046b037 commit 3e0e7d1
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 6 deletions.
Binary file modified dist/CNC/GRBL/index.html.gz
Binary file not shown.
Binary file modified dist/CNC/GRBLHal/index.html.gz
Binary file not shown.
Binary file modified dist/Printer3D/Marlin-embedded/index.html.gz
Binary file not shown.
Binary file modified dist/Printer3D/Marlin/index.html.gz
Binary file not shown.
Binary file modified dist/Printer3D/Repetier/index.html.gz
Binary file not shown.
Binary file modified dist/Printer3D/Smoothieware/index.html.gz
Binary file not shown.
Binary file modified dist/SandTable/GRBL/index.html.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion src/components/App/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
import { h } from "preact"
import { webUIbuild } from "../../targets"
export const webUIversion = "3.0.0-2b1"
export const webUIversion = "3.0.0-3b1"
export const Esp3dVersion = () => (
<span>
{webUIversion}.{webUIbuild}
Expand Down
11 changes: 6 additions & 5 deletions src/components/ExtraContent/extraContentItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const ExtraContentItem = ({
}

if (isPaused || !visibilityState[id] || (target=="panel" && !useUiContextFn.panels.isVisible(elementsCache.getRootfromId(id)))) {
// console.log("Not loading content for " + id + " because it is paused or not visible")
//console.log("Not loading content for " + id + " because it is paused or not visible")
return
}
//console.log("Loading content for " + id)
Expand All @@ -110,7 +110,8 @@ const ExtraContentItem = ({
setIsLoading(false)
isLoadedState[id] = true
} else {
if (isLoadedState[id]){
if (isLoadedState[id] && !refreshIntervalRef.current){
//console.log("Already loaded")
return
}
setIsLoading(true)
Expand Down Expand Up @@ -192,15 +193,15 @@ const ExtraContentItem = ({

useEffect(() => {
if (refreshtime > 0 && (type === "camera" || type === "image") && visibilityState[id] && !isPaused) {
console.log("Updating refresh interval for " + id)
//console.log("Updating refresh interval for " + id)
if (!refreshIntervalRef.current){
console.log("Starting refresh interval for " + id+ " with refreshtime " + refreshtime)
//console.log("Starting refresh interval for " + id+ " with refreshtime " + refreshtime)
refreshIntervalRef.current = setInterval(loadContent, refreshtime)
}
}
return () => {
if (refreshIntervalRef.current) {
console.log("Stopping refresh interval for " + id)
//console.log("Stopping refresh interval for " + id)
clearInterval(refreshIntervalRef.current)
refreshIntervalRef.current = null
}
Expand Down

0 comments on commit 3e0e7d1

Please sign in to comment.