Fixed: Refresh from IndexItem and MovieDetails doesn’t refresh single (#4584)

* Fixed: Refresh from MovieDetails doesn’t refresh single

* Fixed: Refresh from index Item should be sing

* Fixed: Detection on running refresh on MovieDetails
This commit is contained in:
Qstick 2020-07-10 07:39:52 -04:00 committed by GitHub
parent 113f5a9bfe
commit f8f58c2eda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -119,7 +119,7 @@ function createMapStateToProps() {
const previousMovie = sortedMovies[movieIndex - 1] || _.last(sortedMovies);
const nextMovie = sortedMovies[movieIndex + 1] || _.first(sortedMovies);
const isMovieRefreshing = isCommandExecuting(findCommand(commands, { name: commandNames.REFRESH_MOVIE, movieId: movie.id }));
const isMovieRefreshing = isCommandExecuting(findCommand(commands, { name: commandNames.REFRESH_MOVIE, movieIds: [movie.id] }));
const movieRefreshingCommand = findCommand(commands, { name: commandNames.REFRESH_MOVIE });
const allMoviesRefreshing = (
isCommandExecuting(movieRefreshingCommand) &&
@ -290,7 +290,7 @@ class MovieDetailsConnector extends Component {
onRefreshPress = () => {
this.props.dispatchExecuteCommand({
name: commandNames.REFRESH_MOVIE,
movieId: this.props.id
movieIds: [this.props.id]
});
}

View File

@ -51,14 +51,14 @@ function createMapStateToProps() {
const isRefreshingMovie = executingCommands.some((command) => {
return (
command.name === commandNames.REFRESH_MOVIE &&
command.body.movieId === movie.id
command.body.movieIds.includes(movie.id)
);
});
const isSearchingMovie = executingCommands.some((command) => {
return (
command.name === commandNames.MOVIE_SEARCH &&
command.body.movieId === movie.id
command.body.movieIds.includes(movie.id)
);
});
@ -85,7 +85,7 @@ class MovieIndexItemConnector extends Component {
onRefreshMoviePress = () => {
this.props.dispatchExecuteCommand({
name: commandNames.REFRESH_MOVIE,
movieId: this.props.id
movieIds: [this.props.id]
});
}