1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-29 03:15:19 +00:00

Fixed: Movie Editor RootFolders, SelectedState persisting editor toggle

This commit is contained in:
Qstick 2019-07-16 22:23:10 -04:00
parent a6eb89e24b
commit ed24cd5b52
2 changed files with 9 additions and 6 deletions

View file

@ -215,7 +215,9 @@ class MovieIndex extends Component {
if (this.state.isMovieEditorActive) {
this.setState({ isMovieEditorActive: false });
} else {
this.setState({ isMovieEditorActive: true });
const newState = selectAll(this.state.selectedState, false)
newState.isMovieEditorActive = true;
this.setState(newState);
}
}

View file

@ -6,7 +6,7 @@ import createMovieClientSideCollectionItemsSelector from 'Store/Selectors/create
import dimensions from 'Styles/Variables/dimensions';
import createCommandExecutingSelector from 'Store/Selectors/createCommandExecutingSelector';
import createDimensionsSelector from 'Store/Selectors/createDimensionsSelector';
import { fetchMovies } from 'Store/Actions/movieActions';
import { fetchRootFolders } from 'Store/Actions/rootFolderActions';
import scrollPositions from 'Store/scrollPositions';
import { setMovieSort, setMovieFilter, setMovieView, setMovieTableOption, saveMovieEditor } from 'Store/Actions/movieIndexActions';
import { executeCommand } from 'Store/Actions/commandActions';
@ -64,8 +64,8 @@ function createMapStateToProps() {
function createMapDispatchToProps(dispatch, props) {
return {
dispatchFetchMovies() {
dispatch(fetchMovies);
dispatchFetchRootFolders() {
dispatch(fetchRootFolders());
},
onTableOptionChange(payload) {
@ -122,7 +122,8 @@ class MovieIndexConnector extends Component {
}
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,
view: PropTypes.string.isRequired,
scrollTop: PropTypes.number.isRequired,
dispatchFetchMovies: PropTypes.func.isRequired,
dispatchFetchRootFolders: PropTypes.func.isRequired,
dispatchSetMovieView: PropTypes.func.isRequired,
dispatchSaveMovieEditor: PropTypes.func.isRequired
};