mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
parent
a5369df197
commit
6c19569210
1 changed files with 2 additions and 11 deletions
|
@ -1,8 +1,5 @@
|
||||||
import _ from 'lodash';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import isAfter from 'Utilities/Date/isAfter';
|
|
||||||
import isBefore from 'Utilities/Date/isBefore';
|
|
||||||
import { icons, kinds, sizes } from 'Helpers/Props';
|
import { icons, kinds, sizes } from 'Helpers/Props';
|
||||||
import Icon from 'Components/Icon';
|
import Icon from 'Components/Icon';
|
||||||
import IconButton from 'Components/Link/IconButton';
|
import IconButton from 'Components/Link/IconButton';
|
||||||
|
@ -69,16 +66,10 @@ class AlbumDetailsMedium extends Component {
|
||||||
_expandByDefault() {
|
_expandByDefault() {
|
||||||
const {
|
const {
|
||||||
mediumNumber,
|
mediumNumber,
|
||||||
onExpandPress,
|
onExpandPress
|
||||||
items
|
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const expand = _.some(items, (item) => {
|
onExpandPress(mediumNumber, mediumNumber === 1);
|
||||||
return isAfter(item.airDateUtc) ||
|
|
||||||
isAfter(item.airDateUtc, { days: -30 });
|
|
||||||
});
|
|
||||||
|
|
||||||
onExpandPress(mediumNumber, expand && mediumNumber > 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue