Fix loading state on file card and uri indicator when claim is already available

This commit is contained in:
6ea86b96 2017-06-16 09:48:55 +07:00
parent f95853892b
commit 5074b368ee
No known key found for this signature in database
GPG key ID: B282D183E4931E8F
2 changed files with 3 additions and 5 deletions

View file

@ -47,13 +47,11 @@ class FileCard extends React.PureComponent {
const { claim, fileInfo, metadata, isResolvingUri, navigate } = this.props;
const uri = lbryuri.normalize(this.props.uri);
const title = !isResolvingUri && metadata && metadata.title
? metadata.title
: uri;
const title = metadata && metadata.title ? metadata.title : uri;
const obscureNsfw = this.props.obscureNsfw && metadata && metadata.nsfw;
let description = "";
if (isResolvingUri) {
if (isResolvingUri && !claim) {
description = __("Loading...");
} else if (metadata && metadata.description) {
description = metadata.description;

View file

@ -21,7 +21,7 @@ class UriIndicator extends React.PureComponent {
render() {
const { claim, uri, isResolvingUri } = this.props;
if (isResolvingUri) {
if (isResolvingUri && !claim) {
return <span className="empty">Validating...</span>;
}