mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 20:12:41 +02:00
Fixed: Movie Editor RootFolders, SelectedState persisting editor toggle
This commit is contained in:
parent
a6eb89e24b
commit
ed24cd5b52
@ -215,7 +215,9 @@ class MovieIndex extends Component {
|
|||||||
if (this.state.isMovieEditorActive) {
|
if (this.state.isMovieEditorActive) {
|
||||||
this.setState({ isMovieEditorActive: false });
|
this.setState({ isMovieEditorActive: false });
|
||||||
} else {
|
} else {
|
||||||
this.setState({ isMovieEditorActive: true });
|
const newState = selectAll(this.state.selectedState, false)
|
||||||
|
newState.isMovieEditorActive = true;
|
||||||
|
this.setState(newState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import createMovieClientSideCollectionItemsSelector from 'Store/Selectors/create
|
|||||||
import dimensions from 'Styles/Variables/dimensions';
|
import dimensions from 'Styles/Variables/dimensions';
|
||||||
import createCommandExecutingSelector from 'Store/Selectors/createCommandExecutingSelector';
|
import createCommandExecutingSelector from 'Store/Selectors/createCommandExecutingSelector';
|
||||||
import createDimensionsSelector from 'Store/Selectors/createDimensionsSelector';
|
import createDimensionsSelector from 'Store/Selectors/createDimensionsSelector';
|
||||||
import { fetchMovies } from 'Store/Actions/movieActions';
|
import { fetchRootFolders } from 'Store/Actions/rootFolderActions';
|
||||||
import scrollPositions from 'Store/scrollPositions';
|
import scrollPositions from 'Store/scrollPositions';
|
||||||
import { setMovieSort, setMovieFilter, setMovieView, setMovieTableOption, saveMovieEditor } from 'Store/Actions/movieIndexActions';
|
import { setMovieSort, setMovieFilter, setMovieView, setMovieTableOption, saveMovieEditor } from 'Store/Actions/movieIndexActions';
|
||||||
import { executeCommand } from 'Store/Actions/commandActions';
|
import { executeCommand } from 'Store/Actions/commandActions';
|
||||||
@ -64,8 +64,8 @@ function createMapStateToProps() {
|
|||||||
|
|
||||||
function createMapDispatchToProps(dispatch, props) {
|
function createMapDispatchToProps(dispatch, props) {
|
||||||
return {
|
return {
|
||||||
dispatchFetchMovies() {
|
dispatchFetchRootFolders() {
|
||||||
dispatch(fetchMovies);
|
dispatch(fetchRootFolders());
|
||||||
},
|
},
|
||||||
|
|
||||||
onTableOptionChange(payload) {
|
onTableOptionChange(payload) {
|
||||||
@ -122,7 +122,8 @@ class MovieIndexConnector extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.props.dispatchFetchMovies();
|
// TODO: Fetch root folders here for now, but should eventually fetch on editor toggle and check loaded before showing controls
|
||||||
|
this.props.dispatchFetchRootFolders();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -167,7 +168,7 @@ MovieIndexConnector.propTypes = {
|
|||||||
isSmallScreen: PropTypes.bool.isRequired,
|
isSmallScreen: PropTypes.bool.isRequired,
|
||||||
view: PropTypes.string.isRequired,
|
view: PropTypes.string.isRequired,
|
||||||
scrollTop: PropTypes.number.isRequired,
|
scrollTop: PropTypes.number.isRequired,
|
||||||
dispatchFetchMovies: PropTypes.func.isRequired,
|
dispatchFetchRootFolders: PropTypes.func.isRequired,
|
||||||
dispatchSetMovieView: PropTypes.func.isRequired,
|
dispatchSetMovieView: PropTypes.func.isRequired,
|
||||||
dispatchSaveMovieEditor: PropTypes.func.isRequired
|
dispatchSaveMovieEditor: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user