diff --git a/frontend/src/Activity/History/History.js b/frontend/src/Activity/History/History.js index dddfe3d8a..f8990cfbf 100644 --- a/frontend/src/Activity/History/History.js +++ b/frontend/src/Activity/History/History.js @@ -1,6 +1,7 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { align, icons } from 'Helpers/Props'; +import hasDifferentItems from 'Utilities/Object/hasDifferentItems'; import LoadingIndicator from 'Components/Loading/LoadingIndicator'; import Table from 'Components/Table/Table'; import TableBody from 'Components/Table/TableBody'; @@ -17,6 +18,27 @@ import HistoryRowConnector from './HistoryRowConnector'; class History extends Component { + // + // Lifecycle + + 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; + } + // // Render diff --git a/frontend/src/Activity/Queue/Queue.js b/frontend/src/Activity/Queue/Queue.js index 2659159cc..8cfa4c77d 100644 --- a/frontend/src/Activity/Queue/Queue.js +++ b/frontend/src/Activity/Queue/Queue.js @@ -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: {} }); diff --git a/frontend/src/Artist/Details/ArtistDetails.css b/frontend/src/Artist/Details/ArtistDetails.css index c4655c4e1..1fd2f3940 100644 --- a/frontend/src/Artist/Details/ArtistDetails.css +++ b/frontend/src/Artist/Details/ArtistDetails.css @@ -95,6 +95,7 @@ margin: 5px 10px 5px 0; } +.path, .sizeOnDisk, .qualityProfileName, .links, @@ -104,6 +105,12 @@ font-size: 17px; } +.path { + vertical-align: text-top; + font-size: $defaultFontSize; + font-family: $monoSpaceFontFamily; +} + .contentContainer { padding: 20px; } diff --git a/frontend/src/Artist/Details/ArtistDetails.js b/frontend/src/Artist/Details/ArtistDetails.js index de11c7766..74af7b438 100644 --- a/frontend/src/Artist/Details/ArtistDetails.js +++ b/frontend/src/Artist/Details/ArtistDetails.js @@ -347,7 +347,6 @@ class ArtistDetails extends Component {