diff --git a/info.json b/info.json index 234336754..d3c7c76a7 100644 --- a/info.json +++ b/info.json @@ -1,3 +1,3 @@ { - "version": "3.0.0-a81" + "version": "3.0.0-a82" } diff --git a/src/components/App/version.js b/src/components/App/version.js index cd0e9a757..289befab6 100644 --- a/src/components/App/version.js +++ b/src/components/App/version.js @@ -17,7 +17,7 @@ */ import { h } from "preact" import { webUIbuild } from "../../targets" -export const webUIversion = "3.0.0-a81" +export const webUIversion = "3.0.0-a82" export const Esp3dVersion = () => ( {webUIversion}.{webUIbuild} diff --git a/src/components/ExtraContent/extraContentItem.js b/src/components/ExtraContent/extraContentItem.js index 0321ea1cc..1372c016e 100644 --- a/src/components/ExtraContent/extraContentItem.js +++ b/src/components/ExtraContent/extraContentItem.js @@ -82,6 +82,7 @@ const ExtraContentItem = ({ setContentUrl(url) setHasError(false) setIsLoading(false) + isLoadedState[id] = true; }, [type]) const handleContentError = useCallback((error) => { @@ -103,13 +104,16 @@ const ExtraContentItem = ({ return } //console.log("Loading content for " + id) - setIsLoading(true) if (source.startsWith("http")) { setContentUrl(source) setHasError(false) setIsLoading(false) - isLoadedState[id] = true; + isLoadedState[id] = true } else { + if (isLoadedState[id]){ + return + } + setIsLoading(true) const idquery = type === "content" ? type + id : "download" + id let url = source if (url.endsWith(".gz")) { @@ -117,7 +121,7 @@ const ExtraContentItem = ({ } createNewRequest( espHttpURL(url), - { method: "GET", id: idquery, max: 2 }, + { method: "GET", id: idquery, max: 1 }, { onSuccess: handleContentSuccess, onFail: handleContentError, @@ -138,6 +142,7 @@ const ExtraContentItem = ({ const element = document.getElementById(id) if ( 'forceRefresh' in msg && msg.forceRefresh) { //console.log(`Processing forceRefresh for ${id}`); + isLoadedState[id] = false; loadContent() } if ('isVisible' in msg) {