restore resolve dispatch behavior on file cards and tiles
This commit is contained in:
parent
c5c67a0de5
commit
cc1963d21e
2 changed files with 14 additions and 8 deletions
|
@ -20,14 +20,20 @@ class FileCard extends React.PureComponent {
|
|||
}
|
||||
|
||||
componentWillMount() {
|
||||
const { uri, resolveUri } = this.props;
|
||||
resolveUri(uri);
|
||||
this.resolve(this.props);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
const { uri, resolveUri } = nextProps;
|
||||
this.resolve(nextProps);
|
||||
}
|
||||
|
||||
resolve(props) {
|
||||
const { isResolvingUri, resolveUri, claim, uri } = props;
|
||||
|
||||
if (!isResolvingUri && claim === undefined && uri) {
|
||||
resolveUri(uri);
|
||||
}
|
||||
}
|
||||
|
||||
handleMouseOver() {
|
||||
this.setState({
|
||||
|
|
|
@ -26,15 +26,15 @@ class FileTile extends React.PureComponent {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { uri, resolveUri } = this.props;
|
||||
const { isResolvingUri, claim, uri, resolveUri } = this.props;
|
||||
|
||||
resolveUri(uri);
|
||||
if (!isResolvingUri && !claim && uri) resolveUri(uri);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
const { uri, resolveUri } = this.props;
|
||||
const { isResolvingUri, claim, uri, resolveUri } = this.props;
|
||||
|
||||
resolveUri(uri);
|
||||
if (!isResolvingUri && claim === undefined && uri) resolveUri(uri);
|
||||
}
|
||||
|
||||
handleMouseOver() {
|
||||
|
|
Loading…
Add table
Reference in a new issue