From f8f58c2eda8f9c16a2a6fea6c385c10d17a8a0bb Mon Sep 17 00:00:00 2001 From: Qstick Date: Fri, 10 Jul 2020 07:39:52 -0400 Subject: [PATCH] =?UTF-8?q?Fixed:=20Refresh=20from=20IndexItem=20and=20Mov?= =?UTF-8?q?ieDetails=20doesn=E2=80=99t=20refresh=20single=20(#4584)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed: Refresh from MovieDetails doesn’t refresh single * Fixed: Refresh from index Item should be sing * Fixed: Detection on running refresh on MovieDetails --- frontend/src/Movie/Details/MovieDetailsConnector.js | 4 ++-- frontend/src/Movie/Index/MovieIndexItemConnector.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/Movie/Details/MovieDetailsConnector.js b/frontend/src/Movie/Details/MovieDetailsConnector.js index 1f7f9cf93..56da94e7e 100644 --- a/frontend/src/Movie/Details/MovieDetailsConnector.js +++ b/frontend/src/Movie/Details/MovieDetailsConnector.js @@ -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] }); } diff --git a/frontend/src/Movie/Index/MovieIndexItemConnector.js b/frontend/src/Movie/Index/MovieIndexItemConnector.js index 42cc409ef..aa0b803c6 100644 --- a/frontend/src/Movie/Index/MovieIndexItemConnector.js +++ b/frontend/src/Movie/Index/MovieIndexItemConnector.js @@ -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] }); }