canonical url and transform updates #38
1 changed files with 6 additions and 2 deletions
|
@ -13,6 +13,10 @@ import ProgressBar from 'component/progressBar';
|
||||||
import fileListStyle from 'styles/fileList';
|
import fileListStyle from 'styles/fileList';
|
||||||
|
|
||||||
class FileListItem extends React.PureComponent {
|
class FileListItem extends React.PureComponent {
|
||||||
|
state = {
|
||||||
|
url: null,
|
||||||
|
};
|
||||||
|
|
||||||
getStorageForFileInfo = fileInfo => {
|
getStorageForFileInfo = fileInfo => {
|
||||||
if (!fileInfo.completed) {
|
if (!fileInfo.completed) {
|
||||||
const written = formatBytes(fileInfo.written_bytes);
|
const written = formatBytes(fileInfo.written_bytes);
|
||||||
|
@ -44,8 +48,8 @@ class FileListItem extends React.PureComponent {
|
||||||
|
|
||||||
componentDidUpdate() {
|
componentDidUpdate() {
|
||||||
const { claim, resolveUri, uri } = this.props;
|
const { claim, resolveUri, uri } = this.props;
|
||||||
if (!claim) {
|
if (!claim && uri !== this.state.url) {
|
||||||
resolveUri(uri);
|
this.setState({ url: uri }, () => resolveUri(uri));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue