mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
Wanted Monitor/Unmonitor Selected button fixed (#528)
* the button was not changing based on the filter selection nor was it properly carrying out its function. It should now work. this code was ported from Sonarr: https://github.com/Sonarr/Sonarr/commit/979fc436ab88be6e0c9a3f1a721eb3b47d85c218 * indents/spaces/formtting
This commit is contained in:
@@ -4,7 +4,6 @@ import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { createSelector } from 'reselect';
|
||||
import { registerPagePopulator, unregisterPagePopulator } from 'Utilities/pagePopulator';
|
||||
import getFilterValue from 'Utilities/Filter/getFilterValue';
|
||||
import hasDifferentItems from 'Utilities/Object/hasDifferentItems';
|
||||
import selectUniqueIds from 'Utilities/Object/selectUniqueIds';
|
||||
import createCommandExecutingSelector from 'Store/Selectors/createCommandExecutingSelector';
|
||||
@@ -42,7 +41,7 @@ class MissingConnector extends Component {
|
||||
// Lifecycle
|
||||
|
||||
componentDidMount() {
|
||||
registerPagePopulator(this.repopulate);
|
||||
registerPagePopulator(this.repopulate, ['trackFileUpdated']);
|
||||
this.props.gotoMissingFirstPage();
|
||||
}
|
||||
|
||||
@@ -112,19 +111,6 @@ class MissingConnector extends Component {
|
||||
});
|
||||
}
|
||||
|
||||
onToggleSelectedPress = (selected) => {
|
||||
const {
|
||||
filters
|
||||
} = this.props;
|
||||
|
||||
const monitored = getFilterValue(filters, 'monitored');
|
||||
|
||||
this.props.batchToggleMissingAlbums({
|
||||
albumIds: selected,
|
||||
monitored: monitored == null || !monitored
|
||||
});
|
||||
}
|
||||
|
||||
onSearchAllMissingPress = () => {
|
||||
this.props.executeCommand({
|
||||
name: commandNames.MISSING_ALBUM_SEARCH
|
||||
@@ -156,7 +142,6 @@ class MissingConnector extends Component {
|
||||
|
||||
MissingConnector.propTypes = {
|
||||
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
filters: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
fetchMissing: PropTypes.func.isRequired,
|
||||
gotoMissingFirstPage: PropTypes.func.isRequired,
|
||||
gotoMissingPreviousPage: PropTypes.func.isRequired,
|
||||
@@ -167,7 +152,6 @@ MissingConnector.propTypes = {
|
||||
setMissingFilter: PropTypes.func.isRequired,
|
||||
setMissingTableOption: PropTypes.func.isRequired,
|
||||
clearMissing: PropTypes.func.isRequired,
|
||||
batchToggleMissingAlbums: PropTypes.func.isRequired,
|
||||
executeCommand: PropTypes.func.isRequired,
|
||||
fetchQueueDetails: PropTypes.func.isRequired,
|
||||
clearQueueDetails: PropTypes.func.isRequired
|
||||
|
||||
Reference in New Issue
Block a user