Check for internet when determining connection status

CURA-7437
This commit is contained in:
Nino van Hooff 2020-05-26 13:58:21 +02:00
parent 4d5ef91c43
commit 8c28dd8d84

View File

@ -21,7 +21,7 @@ Cura.ExpandablePopup
{ {
return "printer_connected" return "printer_connected"
} }
else if (isConnectedCloudPrinter) else if (isConnectedCloudPrinter && Cura.API.connectionStatus.isInternetReachable)
{ {
return "printer_cloud_connected" return "printer_cloud_connected"
} }
@ -38,7 +38,11 @@ Cura.ExpandablePopup
readonly property string connectionStatusMessage: { readonly property string connectionStatusMessage: {
if (connectionStatus == "printer_cloud_not_available") if (connectionStatus == "printer_cloud_not_available")
{ {
return "The cloud connection is currently unavailable. Please check your internet connection and sign in to connect to the cloud printer" if(Cura.API.connectionStatus.isInternetReachable){
return catalog.i18nc("@status", "The cloud connection is currently unavailable. Please check your internet connection and sign in to connect to the cloud printer.")
} else {
return catalog.i18nc("@status", "The cloud connection is currently unavailable. Please check your internet connection.")
}
} else { } else {
return "" return ""
} }