diff options
author | Michael J Mulligan <mike@belineperspectives.com> | 2021-03-15 16:23:51 +0300 |
---|---|---|
committer | Michael J Mulligan <mike@belineperspectives.com> | 2021-03-15 16:23:51 +0300 |
commit | 9191d7f85bff278c41534814ffd960d4e35e4288 (patch) | |
tree | 305d61c16f2af6ef4098feeb617aa9301d7a4abe | |
parent | fc972a63af3d879b4699c786cd1d30dd4a2d7328 (diff) |
Check the SD state after refresh request.
-rwxr-xr-x | ui/FilesPanel.go | 7 |
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 } |