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,13 +20,19 @@ class FileCard extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
const { uri, resolveUri } = this.props;
|
this.resolve(this.props);
|
||||||
resolveUri(uri);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
componentWillReceiveProps(nextProps) {
|
||||||
const { uri, resolveUri } = nextProps;
|
this.resolve(nextProps);
|
||||||
resolveUri(uri);
|
}
|
||||||
|
|
||||||
|
resolve(props) {
|
||||||
|
const { isResolvingUri, resolveUri, claim, uri } = props;
|
||||||
|
|
||||||
|
if (!isResolvingUri && claim === undefined && uri) {
|
||||||
|
resolveUri(uri);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleMouseOver() {
|
handleMouseOver() {
|
||||||
|
|
|
@ -26,15 +26,15 @@ class FileTile extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
const { uri, resolveUri } = this.props;
|
const { isResolvingUri, claim, uri, resolveUri } = this.props;
|
||||||
|
|
||||||
resolveUri(uri);
|
if (!isResolvingUri && !claim && uri) resolveUri(uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
componentWillReceiveProps(nextProps) {
|
||||||
const { uri, resolveUri } = this.props;
|
const { isResolvingUri, claim, uri, resolveUri } = this.props;
|
||||||
|
|
||||||
resolveUri(uri);
|
if (!isResolvingUri && claim === undefined && uri) resolveUri(uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleMouseOver() {
|
handleMouseOver() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue