|
|
|
@ -3,11 +3,14 @@ import { createSelector } from 'reselect';
|
|
|
|
|
import moment from 'moment';
|
|
|
|
|
import { isCommandExecuting } from 'Utilities/Command';
|
|
|
|
|
import isBefore from 'Utilities/Date/isBefore';
|
|
|
|
|
import * as commandNames from 'Commands/commandNames';
|
|
|
|
|
import withCurrentPage from 'Components/withCurrentPage';
|
|
|
|
|
import { executeCommand } from 'Store/Actions/commandActions';
|
|
|
|
|
import { searchMissing, setCalendarDaysCount, setCalendarFilter } from 'Store/Actions/calendarActions';
|
|
|
|
|
import createMovieCountSelector from 'Store/Selectors/createMovieCountSelector';
|
|
|
|
|
import createUISettingsSelector from 'Store/Selectors/createUISettingsSelector';
|
|
|
|
|
import createCommandsSelector from 'Store/Selectors/createCommandsSelector';
|
|
|
|
|
import createCommandExecutingSelector from 'Store/Selectors/createCommandExecutingSelector';
|
|
|
|
|
import CalendarPage from './CalendarPage';
|
|
|
|
|
|
|
|
|
|
function createMissingMovieIdsSelector() {
|
|
|
|
@ -59,6 +62,7 @@ function createMapStateToProps() {
|
|
|
|
|
createMovieCountSelector(),
|
|
|
|
|
createUISettingsSelector(),
|
|
|
|
|
createMissingMovieIdsSelector(),
|
|
|
|
|
createCommandExecutingSelector(commandNames.RSS_SYNC),
|
|
|
|
|
createIsSearchingSelector(),
|
|
|
|
|
(
|
|
|
|
|
selectedFilterKey,
|
|
|
|
@ -66,6 +70,7 @@ function createMapStateToProps() {
|
|
|
|
|
movieCount,
|
|
|
|
|
uiSettings,
|
|
|
|
|
missingMovieIds,
|
|
|
|
|
isRssSyncExecuting,
|
|
|
|
|
isSearchingForMissing
|
|
|
|
|
) => {
|
|
|
|
|
return {
|
|
|
|
@ -75,6 +80,7 @@ function createMapStateToProps() {
|
|
|
|
|
hasMovie: !!movieCount.count,
|
|
|
|
|
movieError: movieCount.error,
|
|
|
|
|
missingMovieIds,
|
|
|
|
|
isRssSyncExecuting,
|
|
|
|
|
isSearchingForMissing
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
@ -83,6 +89,12 @@ function createMapStateToProps() {
|
|
|
|
|
|
|
|
|
|
function createMapDispatchToProps(dispatch, props) {
|
|
|
|
|
return {
|
|
|
|
|
onRssSyncPress() {
|
|
|
|
|
dispatch(executeCommand({
|
|
|
|
|
name: commandNames.RSS_SYNC
|
|
|
|
|
}));
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onSearchMissingPress(movieIds) {
|
|
|
|
|
dispatch(searchMissing({ movieIds }));
|
|
|
|
|
},
|
|
|
|
|