|
|
|
@ -1,9 +1,12 @@
|
|
|
|
|
import moment from 'moment';
|
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
|
import { createSelector } from 'reselect';
|
|
|
|
|
import * as commandNames from 'Commands/commandNames';
|
|
|
|
|
import withCurrentPage from 'Components/withCurrentPage';
|
|
|
|
|
import { searchMissing, setCalendarDaysCount, setCalendarFilter } from 'Store/Actions/calendarActions';
|
|
|
|
|
import { executeCommand } from 'Store/Actions/commandActions';
|
|
|
|
|
import createArtistCountSelector from 'Store/Selectors/createArtistCountSelector';
|
|
|
|
|
import createCommandExecutingSelector from 'Store/Selectors/createCommandExecutingSelector';
|
|
|
|
|
import createCommandsSelector from 'Store/Selectors/createCommandsSelector';
|
|
|
|
|
import createUISettingsSelector from 'Store/Selectors/createUISettingsSelector';
|
|
|
|
|
import { isCommandExecuting } from 'Utilities/Command';
|
|
|
|
@ -59,6 +62,7 @@ function createMapStateToProps() {
|
|
|
|
|
createArtistCountSelector(),
|
|
|
|
|
createUISettingsSelector(),
|
|
|
|
|
createMissingAlbumIdsSelector(),
|
|
|
|
|
createCommandExecutingSelector(commandNames.RSS_SYNC),
|
|
|
|
|
createIsSearchingSelector(),
|
|
|
|
|
(
|
|
|
|
|
selectedFilterKey,
|
|
|
|
@ -66,6 +70,7 @@ function createMapStateToProps() {
|
|
|
|
|
artistCount,
|
|
|
|
|
uiSettings,
|
|
|
|
|
missingAlbumIds,
|
|
|
|
|
isRssSyncExecuting,
|
|
|
|
|
isSearchingForMissing
|
|
|
|
|
) => {
|
|
|
|
|
return {
|
|
|
|
@ -77,6 +82,7 @@ function createMapStateToProps() {
|
|
|
|
|
artistIsFetching: artistCount.isFetching,
|
|
|
|
|
artistIsPopulated: artistCount.isPopulated,
|
|
|
|
|
missingAlbumIds,
|
|
|
|
|
isRssSyncExecuting,
|
|
|
|
|
isSearchingForMissing
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
@ -85,9 +91,16 @@ function createMapStateToProps() {
|
|
|
|
|
|
|
|
|
|
function createMapDispatchToProps(dispatch, props) {
|
|
|
|
|
return {
|
|
|
|
|
onRssSyncPress() {
|
|
|
|
|
dispatch(executeCommand({
|
|
|
|
|
name: commandNames.RSS_SYNC
|
|
|
|
|
}));
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onSearchMissingPress(albumIds) {
|
|
|
|
|
dispatch(searchMissing({ albumIds }));
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onDaysCountChange(dayCount) {
|
|
|
|
|
dispatch(setCalendarDaysCount({ dayCount }));
|
|
|
|
|
},
|
|
|
|
|