From 5074b368eef83e2dbb02236c7776f97f17b1806a Mon Sep 17 00:00:00 2001 From: 6ea86b96 <6ea86b96@gmail.com> Date: Fri, 16 Jun 2017 09:48:55 +0700 Subject: [PATCH] Fix loading state on file card and uri indicator when claim is already available --- ui/js/component/fileCard/view.jsx | 6 ++---- ui/js/component/uriIndicator/view.jsx | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ui/js/component/fileCard/view.jsx b/ui/js/component/fileCard/view.jsx index 70b8e8132..0cd9d7376 100644 --- a/ui/js/component/fileCard/view.jsx +++ b/ui/js/component/fileCard/view.jsx @@ -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; diff --git a/ui/js/component/uriIndicator/view.jsx b/ui/js/component/uriIndicator/view.jsx index 92db16629..b69abd591 100644 --- a/ui/js/component/uriIndicator/view.jsx +++ b/ui/js/component/uriIndicator/view.jsx @@ -21,7 +21,7 @@ class UriIndicator extends React.PureComponent { render() { const { claim, uri, isResolvingUri } = this.props; - if (isResolvingUri) { + if (isResolvingUri && !claim) { return Validating...; }