Misc UI Updates

This commit is contained in:
Qstick 2017-10-28 16:13:32 -04:00
parent 1b64171b30
commit cb9af37c39
6 changed files with 65 additions and 6 deletions

View file

@ -37,6 +37,24 @@ class Queue extends Component {
};
}
shouldComponentUpdate(nextProps) {
// Don't update when fetching has completed if items have changed,
// before albums start fetching or when albums start fetching.
if (
(
this.props.isFetching &&
nextProps.isPopulated &&
hasDifferentItems(this.props.items, nextProps.items)
) ||
(!this.props.isAlbumsFetching && nextProps.isAlbumsFetching)
) {
return false;
}
return true;
}
componentDidUpdate(prevProps) {
if (hasDifferentItems(prevProps.items, this.props.items)) {
this.setState({ selectedState: {} });