|
|
@ -9,7 +9,7 @@ function findMatchingItems(ids, items) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function createMatchingMovieSelector() {
|
|
|
|
function createUnorderedMatchingMoviesSelector() {
|
|
|
|
return createSelector(
|
|
|
|
return createSelector(
|
|
|
|
(state, { movieIds }) => movieIds,
|
|
|
|
(state, { movieIds }) => movieIds,
|
|
|
|
createAllMoviesSelector(),
|
|
|
|
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() {
|
|
|
|
function createMatchingDelayProfilesSelector() {
|
|
|
|
return createSelector(
|
|
|
|
return createSelector(
|
|
|
|
(state, { delayProfileIds }) => delayProfileIds,
|
|
|
|
(state, { delayProfileIds }) => delayProfileIds,
|
|
|
@ -51,7 +71,7 @@ function createMatchingNetImportsSelector() {
|
|
|
|
|
|
|
|
|
|
|
|
function createMapStateToProps() {
|
|
|
|
function createMapStateToProps() {
|
|
|
|
return createSelector(
|
|
|
|
return createSelector(
|
|
|
|
createMatchingMovieSelector(),
|
|
|
|
createMatchingMoviesSelector(),
|
|
|
|
createMatchingDelayProfilesSelector(),
|
|
|
|
createMatchingDelayProfilesSelector(),
|
|
|
|
createMatchingNotificationsSelector(),
|
|
|
|
createMatchingNotificationsSelector(),
|
|
|
|
createMatchingRestrictionsSelector(),
|
|
|
|
createMatchingRestrictionsSelector(),
|
|
|
|