Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Z-Bolt/OctoScreen.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael J Mulligan <mike@belineperspectives.com>2021-03-15 16:23:51 +0300
committerMichael J Mulligan <mike@belineperspectives.com>2021-03-15 16:23:51 +0300
commit9191d7f85bff278c41534814ffd960d4e35e4288 (patch)
tree305d61c16f2af6ef4098feeb617aa9301d7a4abe
parentfc972a63af3d879b4699c786cd1d30dd4a2d7328 (diff)
Check the SD state after refresh request.
-rwxr-xr-xui/FilesPanel.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/FilesPanel.go b/ui/FilesPanel.go
index cc1b890..3af6ca2 100755
--- a/ui/FilesPanel.go
+++ b/ui/FilesPanel.go
@@ -128,7 +128,12 @@ func (this *filesPanel) doLoadFiles() {
func (this *filesPanel) refreshSD() bool {
err := (&octoprintApis.SdRefreshRequest {}).Do(this.UI.Client)
if err == nil {
- return true
+ sdState, err := (&octoprintApis.SdStateRequest {}).Do(this.UI.Client)
+ if err == nil && sdState.IsReady == true {
+ return true
+ } else {
+ return false
+ }
} else {
return false
}