|
|
|
@ -9,7 +9,7 @@ function findMatchingItems(ids, items) {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function createMatchingMovieSelector() {
|
|
|
|
|
function createUnorderedMatchingMoviesSelector() {
|
|
|
|
|
return createSelector(
|
|
|
|
|
(state, { movieIds }) => movieIds,
|
|
|
|
|
createAllMoviesSelector(),
|
|
|
|
@ -17,6 +17,26 @@ function createMatchingMovieSelector() {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function createMatchingMoviesSelector() {
|
|
|
|
|
return createSelector(
|
|
|
|
|
createUnorderedMatchingMoviesSelector(),
|
|
|
|
|
(movies) => {
|
|
|
|
|
return movies.sort((movieA, movieB) => {
|
|
|
|
|
const sortTitleA = movieA.sortTitle;
|
|
|
|
|
const sortTitleB = movieB.sortTitle;
|
|
|
|
|
|
|
|
|
|
if (sortTitleA > sortTitleB) {
|
|
|
|
|
return 1;
|
|
|
|
|
} else if (sortTitleA < sortTitleB) {
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function createMatchingDelayProfilesSelector() {
|
|
|
|
|
return createSelector(
|
|
|
|
|
(state, { delayProfileIds }) => delayProfileIds,
|
|
|
|
@ -51,7 +71,7 @@ function createMatchingNetImportsSelector() {
|
|
|
|
|
|
|
|
|
|
function createMapStateToProps() {
|
|
|
|
|
return createSelector(
|
|
|
|
|
createMatchingMovieSelector(),
|
|
|
|
|
createMatchingMoviesSelector(),
|
|
|
|
|
createMatchingDelayProfilesSelector(),
|
|
|
|
|
createMatchingNotificationsSelector(),
|
|
|
|
|
createMatchingRestrictionsSelector(),
|
|
|
|
|