Detail number of available devices in doctor summary (#14781)

This commit is contained in:
Michael Thomsen 2018-02-22 17:40:56 +01:00 committed by GitHub
parent b6d8615aed
commit 382ee4baa4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -542,7 +542,12 @@ class DeviceValidator extends DoctorValidator {
messages = await Device.descriptions(devices)
.map((String msg) => new ValidationMessage(msg)).toList();
}
return new ValidationResult(devices.isEmpty ? ValidationType.partial : ValidationType.installed, messages);
if (devices.isEmpty) {
return new ValidationResult(ValidationType.partial, messages);
} else {
return new ValidationResult(ValidationType.installed, messages, statusInfo: '${devices.length} available');
}
}
}