#29: Mounts aren't being detected properly when switching releases
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# Changelog #
|
||||
## 1.0.5 ##
|
||||
* \#29: Mounts aren't being detected properly when switching releases
|
||||
* Display window when dependencies are missing
|
||||
* Display window when UI upgrade is available
|
||||
|
||||
|
||||
@@ -12,14 +12,6 @@ import {notifyError} from '../../redux/actions/error_actions';
|
||||
const Constants = require('../../constants');
|
||||
|
||||
class Configuration extends IPCContainer {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.setRequestHandler(Constants.IPC_Get_Config_Template_Reply, this.onGetConfigTemplateReply);
|
||||
this.setRequestHandler(Constants.IPC_Get_Config_Reply, this.onGetConfigReply);
|
||||
this.setRequestHandler(Constants.IPC_Set_Config_Values_Reply, this.onSetConfigValuesReply);
|
||||
}
|
||||
|
||||
_isMounted = false;
|
||||
|
||||
state = {
|
||||
@@ -73,6 +65,9 @@ class Configuration extends IPCContainer {
|
||||
|
||||
componentDidMount() {
|
||||
this._isMounted = true;
|
||||
this.setRequestHandler(Constants.IPC_Get_Config_Template_Reply, this.onGetConfigTemplateReply);
|
||||
this.setRequestHandler(Constants.IPC_Get_Config_Reply, this.onGetConfigReply);
|
||||
this.setRequestHandler(Constants.IPC_Set_Config_Values_Reply, this.onSetConfigValuesReply);
|
||||
this.sendRequest(Constants.IPC_Get_Config_Template, {
|
||||
Provider: this.props.DisplayConfiguration,
|
||||
Version: this.props.version,
|
||||
|
||||
@@ -7,6 +7,7 @@ import Modal from '../../components/UI/Modal/Modal';
|
||||
import MountItem from '../../components/MountItem/MountItem';
|
||||
import IPCContainer from '../IPCContainer/IPCContainer';
|
||||
import {
|
||||
resetMountsState,
|
||||
setAllowMount,
|
||||
setAutoMountProcessed,
|
||||
setBusy,
|
||||
@@ -19,14 +20,6 @@ import {notifyError} from '../../redux/actions/error_actions';
|
||||
const Constants = require('../../constants');
|
||||
|
||||
class MountItems extends IPCContainer {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.setRequestHandler(Constants.IPC_Detect_Mounts_Reply, this.onDetectMountsReply);
|
||||
this.setRequestHandler(Constants.IPC_Mount_Drive_Reply, this.onMountDriveReply);
|
||||
this.setRequestHandler(Constants.IPC_Unmount_Drive_Reply, this.onUnmountDriveReply);
|
||||
}
|
||||
|
||||
retryIntervals = {};
|
||||
|
||||
state = {
|
||||
@@ -56,6 +49,10 @@ class MountItems extends IPCContainer {
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
this.setRequestHandler(Constants.IPC_Detect_Mounts_Reply, this.onDetectMountsReply);
|
||||
this.setRequestHandler(Constants.IPC_Mount_Drive_Reply, this.onMountDriveReply);
|
||||
this.setRequestHandler(Constants.IPC_Unmount_Drive_Reply, this.onUnmountDriveReply);
|
||||
this.props.resetMountsState();
|
||||
this.detectMounts();
|
||||
}
|
||||
|
||||
@@ -66,6 +63,7 @@ class MountItems extends IPCContainer {
|
||||
}
|
||||
}
|
||||
|
||||
this.props.resetMountsState();
|
||||
super.componentWillUnmount();
|
||||
};
|
||||
|
||||
@@ -318,6 +316,7 @@ const mapStateToProps = state => {
|
||||
AutoMountProcessed: state.mounts.AutoMountProcessed,
|
||||
InstalledVersion: state.relver.InstalledVersion,
|
||||
MountState: state.mounts.MountState,
|
||||
MountsBusy: state.mounts.MountsBusy,
|
||||
Platform: state.common.Platform,
|
||||
ProviderState: state.mounts.ProviderState,
|
||||
}
|
||||
@@ -326,6 +325,7 @@ const mapStateToProps = state => {
|
||||
const mapDispatchToProps = dispatch => {
|
||||
return {
|
||||
notifyError: (msg, critical, callback) => dispatch(notifyError(msg, critical, callback)),
|
||||
resetMountsState: () => dispatch(resetMountsState()),
|
||||
setAllowMount: (provider, allow) => dispatch(setAllowMount(provider, allow)),
|
||||
setAutoMountProcessed: processed => dispatch(setAutoMountProcessed(processed)),
|
||||
setMounted: (provider, mounted) => dispatch(setMounted(provider, mounted)),
|
||||
|
||||
@@ -2,6 +2,13 @@ import {createAction} from 'redux-starter-kit';
|
||||
|
||||
export const displayConfiguration = createAction('mounts/displayConfiguration');
|
||||
|
||||
export const RESET_MOUNTS_STATE = 'mounts/resetMountsState';
|
||||
export const resetMountsState = () => {
|
||||
return {
|
||||
type: RESET_MOUNTS_STATE,
|
||||
payload: null,
|
||||
}
|
||||
};
|
||||
export const SET_ALLOW_MOUNT = 'mounts/setAllowMount';
|
||||
export const setAllowMount = (provider, allow) => {
|
||||
return {
|
||||
|
||||
@@ -2,6 +2,7 @@ import * as Constants from '../../constants';
|
||||
import {createReducer} from 'redux-starter-kit';
|
||||
import {
|
||||
displayConfiguration,
|
||||
RESET_MOUNTS_STATE,
|
||||
SET_ALLOW_MOUNT,
|
||||
setAutoMountProcessed,
|
||||
setBusy,
|
||||
@@ -53,6 +54,13 @@ export const mountReducer = createReducer({
|
||||
DisplayConfiguration: action.payload
|
||||
};
|
||||
},
|
||||
[RESET_MOUNTS_STATE]: (state, action) => {
|
||||
return {
|
||||
...state,
|
||||
MountsBusy: false,
|
||||
MountState: mountState,
|
||||
}
|
||||
},
|
||||
[setAutoMountProcessed]: (state, action) => {
|
||||
return {
|
||||
...state,
|
||||
|
||||
Reference in New Issue
Block a user