diff --git a/package/contents/ui/Utils.js b/package/contents/ui/Utils.js index 1368e5a..a05c7ce 100644 --- a/package/contents/ui/Utils.js +++ b/package/contents/ui/Utils.js @@ -239,18 +239,18 @@ function checkStat() { xhr.onreadystatechange = function() { if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.status === 200) { + if (ollamaRunning === false) { + getModels(); + } ollamaRunning = true; - updateActionButton("Stop Ollama", Qt.resolvedUrl("icons/stop.svg"), "stopOllama"); // console.log("Ollama Running: " + ollamaRunning + " | Ollama is running"); } else { endAll(); ollamaRunning = false; - models.clear(); runningModels.clear(); - updateActionButton("Start Ollama", Qt.resolvedUrl("icons/start.svg"), "startOllama"); // console.log("Ollama Running: " + ollamaRunning + " | Ollama is not running"); diff --git a/package/contents/ui/main.qml b/package/contents/ui/main.qml index 27748d0..b810e6b 100644 --- a/package/contents/ui/main.qml +++ b/package/contents/ui/main.qml @@ -24,7 +24,7 @@ PlasmoidItem { Component.onCompleted: () => { Utils.checkStat(); - Utils.getModels(); + // Utils.getModels(); } ListModel {