mirror of
https://github.com/lidarr/Lidarr
synced 2025-02-25 15:22:42 +00: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 React, { Component } from 'react';
|
||||
import isAfter from 'Utilities/Date/isAfter';
|
||||
import isBefore from 'Utilities/Date/isBefore';
|
||||
import { icons, kinds, sizes } from 'Helpers/Props';
|
||||
import Icon from 'Components/Icon';
|
||||
import IconButton from 'Components/Link/IconButton';
|
||||
|
@ -69,16 +66,10 @@ class AlbumDetailsMedium extends Component {
|
|||
_expandByDefault() {
|
||||
const {
|
||||
mediumNumber,
|
||||
onExpandPress,
|
||||
items
|
||||
onExpandPress
|
||||
} = this.props;
|
||||
|
||||
const expand = _.some(items, (item) => {
|
||||
return isAfter(item.airDateUtc) ||
|
||||
isAfter(item.airDateUtc, { days: -30 });
|
||||
});
|
||||
|
||||
onExpandPress(mediumNumber, expand && mediumNumber > 0);
|
||||
onExpandPress(mediumNumber, mediumNumber === 1);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue