Fix mount busy detection

This commit is contained in:
2019-11-26 16:53:39 -06:00
parent c096118807
commit fcfd6175e6

View File

@@ -227,6 +227,15 @@ class MountItems extends IPCContainer {
];
};
hasActiveMount = () => {
for (const provider of Object.keys(this.props.MountState)) {
if (this.props.MountState[provider].Mounted)
return true;
}
return false;
};
onDetectMountReply = (event, arg) => {
const provider = arg.data.Provider;
if (!this.state.RetryItems[provider]) {
@@ -268,7 +277,7 @@ class MountItems extends IPCContainer {
if (idx > -1) {
this.activeDetections.splice(idx, 1);
}
this.props.setMountsBusy(this.activeDetections.length > 0);
this.props.setMountsBusy((this.activeDetections.length > 0) || this.hasActiveMount());
};
updateMountLocation = (provider, location, mounted, driveLetters) => {