Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Sonarr/commit/dd8d1b673e0d1b31cf88c7e6bd9150a166f3d1d3
You should set ROOT_URL correctly, otherwise the web may not work correctly.
5 changed files with
43 additions and
14 deletions
@ -4,7 +4,7 @@ import React, { Component } from 'react';
import ReactDOM from 'react-dom' ;
import { Grid , WindowScroller } from 'react-virtualized' ;
import getIndexOfFirstCharacter from 'Utilities/Array/getIndexOfFirstCharacter' ;
import hasDifferentItems from 'Utilities/Object/hasDifferentItems ';
import hasDifferentItems OrOrder from 'Utilities/Object/hasDifferentItems OrOrder ';
import dimensions from 'Styles/Variables/dimensions' ;
import { sortDirections } from 'Helpers/Props' ;
import Measure from 'Components/Measure' ;
@ -84,7 +84,7 @@ class SeriesIndexOverviews extends Component {
jumpToCharacter
} = this . props ;
const itemsChanged = hasDifferentItems ( prevProps . items , items ) ;
const itemsChanged = hasDifferentItems OrOrder ( prevProps . items , items ) ;
const overviewOptionsChanged = ! _ . isMatch ( prevProps . overviewOptions , overviewOptions ) ;
if (
@ -3,7 +3,7 @@ import React, { Component } from 'react';
import ReactDOM from 'react-dom' ;
import { Grid , WindowScroller } from 'react-virtualized' ;
import getIndexOfFirstCharacter from 'Utilities/Array/getIndexOfFirstCharacter' ;
import hasDifferentItems from 'Utilities/Object/hasDifferentItems ';
import hasDifferentItems OrOrder from 'Utilities/Object/hasDifferentItems OrOrder ';
import dimensions from 'Styles/Variables/dimensions' ;
import { sortDirections } from 'Helpers/Props' ;
import Measure from 'Components/Measure' ;
@ -124,7 +124,7 @@ class SeriesIndexPosters extends Component {
jumpToCharacter
} = this . props ;
const itemsChanged = hasDifferentItems ( prevProps . items , items ) ;
const itemsChanged = hasDifferentItems OrOrder ( prevProps . items , items ) ;
if (
prevProps . sortKey !== sortKey ||
@ -1,7 +1,7 @@
import _ from 'lodash' ;
import PropTypes from 'prop-types' ;
import React , { Component } from 'react' ;
import hasDifferentItems from 'Utilities/Object/hasDifferentItems ';
import hasDifferentItems OrOrder from 'Utilities/Object/hasDifferentItems OrOrder ';
import { align , icons , sortDirections } from 'Helpers/Props' ;
import LoadingIndicator from 'Components/Loading/LoadingIndicator' ;
import PageContent from 'Components/Page/PageContent' ;
@ -67,10 +67,9 @@ class SeriesIndex extends Component {
scrollTop
} = this . props ;
if (
hasDifferentItems ( prevProps . items , items ) ||
sortKey !== prevProps . sortKey ||
sortDirection !== prevProps . sortDirection
if ( sortKey !== prevProps . sortKey ||
sortDirection !== prevProps . sortDirection ||
hasDifferentItemsOrOrder ( prevProps . items , items )
) {
this . setJumpBarItems ( ) ;
}
@ -1,10 +1,19 @@
import _ from 'lodash' ;
function hasDifferentItems ( prevItems , currentItems , idProp = 'id' ) {
const diff1 = _ . differenceBy ( prevItems , currentItems , ( item ) => item [ idProp ] ) ;
const diff2 = _ . differenceBy ( currentItems , prevItems , ( item ) => item [ idProp ] ) ;
if ( prevItems === currentItems ) {
return false ;
}
if ( prevItems . length !== currentItems . length ) {
return true ;
}
const currentItemIds = new Set ( ) ;
currentItems . forEach ( ( currentItem ) => {
currentItemIds . add ( currentItem [ idProp ] ) ;
} ) ;
return diff1 . length > 0 || diff2 . length > 0 ;
return prevItems. every ( ( prevItem ) => currentItemIds . has ( prevItem [ idProp ] ) ) ;
}
export default hasDifferentItems ;
@ -0,0 +1,21 @@
function hasDifferentItemsOrOrder ( prevItems , currentItems , idProp = 'id' ) {
if ( prevItems === currentItems ) {
return false ;
}
const len = prevItems . length ;
if ( len !== currentItems . length ) {
return true ;
}
for ( let i = 0 ; i < len ; i ++ ) {
if ( prevItems [ i ] [ idProp ] !== currentItems [ i ] [ idProp ] ) {
return true ;
}
}
return false ;
}
export default hasDifferentItemsOrOrder ;