mirror of https://github.com/Radarr/Radarr
Fixed: Queue Items don't show up
This commit is contained in:
parent
f3d7852ec4
commit
0b113b9bab
|
@ -44,10 +44,14 @@ class Queue extends Component {
|
||||||
|
|
||||||
componentDidUpdate(prevProps) {
|
componentDidUpdate(prevProps) {
|
||||||
const {
|
const {
|
||||||
items
|
items,
|
||||||
|
isMoviesFetching
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
if (hasDifferentItems(prevProps.items, items) && !items.some((e) => e.movieId)) {
|
if (
|
||||||
|
(!isMoviesFetching && prevProps.isMoviesFetching) ||
|
||||||
|
(hasDifferentItems(prevProps.items, items) && !items.some((e) => e.movieId))
|
||||||
|
) {
|
||||||
this.setState((state) => {
|
this.setState((state) => {
|
||||||
return {
|
return {
|
||||||
...removeOldSelectedState(state, getRemovedItems(prevProps.items, items)),
|
...removeOldSelectedState(state, getRemovedItems(prevProps.items, items)),
|
||||||
|
|
|
@ -17,7 +17,7 @@ const blacklistedProperties = [
|
||||||
];
|
];
|
||||||
|
|
||||||
function createItemMap(data) {
|
function createItemMap(data) {
|
||||||
return data.reduce((acc, d, index, array) => {
|
return data.reduce((acc, d, index) => {
|
||||||
acc[d.id] = index;
|
acc[d.id] = index;
|
||||||
return acc;
|
return acc;
|
||||||
}, {});
|
}, {});
|
||||||
|
@ -49,7 +49,7 @@ export default function createHandleActions(handlers, defaultState, section) {
|
||||||
|
|
||||||
if (_.isArray(payload.data)) {
|
if (_.isArray(payload.data)) {
|
||||||
newState.items = payload.data;
|
newState.items = payload.data;
|
||||||
newState.itemMap = createItemMap(newState.items);
|
newState.itemMap = createItemMap(payload.data);
|
||||||
} else {
|
} else {
|
||||||
newState.item = payload.data;
|
newState.item = payload.data;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue